Porting a little Arduino code....


Author Message
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 10056
Posted: 12:20am 22 Jan 2015      

  matherp said  If it is 4 chips use SPI OPEN 1000000,3,32 to send all the data in one go

then:
i=spi(&HFFFFFFFF)
pulse LT_latch,0.01

should light all the display elements


Do you have any bright ideas as to how I would build the 32-bit word to send to the display, representing the four digits I need?

Lets start with something simple like "1234"

Assuming the data from the Arduio code is right, then the 8-bit data for the numbers would be: "1"=&H60, "2"=&HDA, "3"=&HF2 and "4"=&H66.

How do I combine those bytes in the correct way, to generate the 32-bit word to send?
Smoke makes things work. When the smoke gets out, it stops!