Question : Problem: Converting 4 bit to SPI on the C8051F330 controller

I am using the C8051F330 to provide data translation from a 4-Bit MM74C922
Key Encoder to a MC14489 LED Display driver. The MC14489 uses the Motorola SPI serial data protocol as its input. I am using the 8 bit format and trying to convert 4 bit hex to an 8 bit SPI that the the MC14489 can interpret and drive a 2 digit LED display. I am not the best at C code so I am wondering if someone can get me started in the right direction programming this interface. I am using SCK, MISO, MOSI, and NSS as my outputs on P0.0-P0.3 and the 4 bit is coming in on P1.4-P1.7.

Answer : Problem: Converting 4 bit to SPI on the C8051F330 controller

 Your display only accepts the digiis in pairs (8bit) so you'll have to send the nibles in pairs

  I've already sent you the link of the complete driver...

http://www.echelon.com/Support/documentation/bulletin/005-0014-01C.pdf


and the complete explanation is on page 8 of this manual...

 http://www.cs.net/lucid/mc14489rev4.pdf

 on the bottom of the page 8 you'll see the graph of the 24bit command...  begin from left to write... you have 3 pins.. and that's what they should be doing...
 enable low... set data (high or low).. clock high clock low... set data ... clock high clock low... untill you reach the last digit.. then you enable high to end conversation... that's it!
Random Solutions  
 
programming4us programming4us