Hello,
On Saturday, September 27, 2014 06:54:27 AM Geert Lorang wrote:
> Hello,
>
> I've got a frontpanel from some old set-top box which has a PT6958 on
> board. It's a SPI LED driver IC with key scanning support (4 x 7 segment
> display, led control & 24 keys).
>
> I've got the 4x7 segment display and the leds 100% working but I just can't
> get any data out of the key scanning and I'm out of ideas where to look.
>
> The PCB has a 10 pins header of which 3 are connected to the PT6958 chip :
> STB / CLK / DIN+DOUT. The manufacturer put DOUT and DIN on the same pin on
> the header, So I've tied MOSI and MISO together and connected it to this
> pin. It seems to work ok.
But only for output to the PT6958?
If you are unable to read anything back other then whats going out on MOSI,
its because the MISO and MOSI pins are tied together.
You may need a resistor network so the input from the device to MISO will
override MOSI.
Looks like you are using the library correctly though.
Cheers.
>
> E.g.
> char data = bcm2835_spi_transfer(0x40);
> printf("%02x\n", data);
>
> will actually print out 0x40. With MOSI disconnected I will read out 0xFF,
> with MISO disconnected I read out 0x00. So guess the tying is ok?!
> Also when I tie MISO directly to the DOUT of the IC (bypassing the pin
> header on the PCB) I get the same result.
>
> According to the datasheet you just need to write 0x42 after which it will
> send back the key scanning data but all i'm getting back are 0x00's.
> E.g.:
> while(1) {
> char read[] = { 0x42, 0x00, 0x00 };
> bcm2835_spi_transfern(read, sizeof(read));
> for(i=0;i<sizeof(read);i++) { printf("%02x ", read[i]); }
> printf("\n");
> bcm2835_delay(1000);
> }
>
> Prints out:
> 42 00 00
> 42 00 00
> 42 00 00
> 42 00 00
>
>
> Data sheet can be found here
>
> :
http://www.princeton.com.tw/en-us/products/leddriveric/leddisplaydriveric.
> : aspx
> If anyone successfully managed to read out keyscan data from PT69*, please
> let me know.
>
> Thanks!
> Geert
--
Mike McCauley VK4AMM
mi...@airspayce.com
Airspayce Pty Ltd 9 Bulbul Place Currumbin Waters QLD 4223 Australia
http://www.airspayce.com
Phone
+61 7 5598-7474