Re: BT878 GPIO programming

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



> btwrite(0x7fff,BT848_GPIO_OUT_EN); // disable all outputs
> btwrite(0x0000,BT848_GPIO_OUT_EN); // enable all outputs
> btwrite(0x0000,BT848_GPIO_DATA); // set all outputs to /0 (+5V)
> btwrite(0x7fff,BT848_GPIO_DATA); // set all outputs to /1 (0V)

Each GPIO pin is basically a tri-state buffer.  To use a GPIO as an
output you must first enable the bit in the GPIO_OUT_EN register (1 =
enable the pin for output).  Once the output is enabled, writing data to
the GPIO_DATA register should show on the GPIO pin.  A '1' should drive
a +5V logic high and a '0' should drive a 0V logic low.

Each GPIO pin has an internal pull-up so all undriven GPIO pins will
have a +5V logic high.

So here is what your code should look like:

btwrite(0x0000,BT848_GPIO_OUT_EN); // DISABLE all outputs
btwrite(0x7fff,BT848_GPIO_OUT_EN); // ENABLE all outputs
btwrite(0x0000,BT848_GPIO_DATA); // set all outputs to logic 0 (0V)
btwrite(0x7fff,BT848_GPIO_DATA); // set all outputs to logic 1 (+5V)

Mike






[Index of Archives]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [Linux USB]

Powered by Linux