Object for MAX7219 LED Display Drive
SEL
Posts: 80
I am a newbie to programming the propeller chip.
Has anyone created an object for the Max7219 LCD Driver?
Has anyone created an object for the Max7219 LCD Driver?
Comments
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Thank you! This my first time using the FORUM.
So, if I understand you: I should look for an object that uses SPI for Max7219 interface?
SEL
Feel free to ask more questions.
Stan Lindo
I sent a reply, but did not use your signin name.
Once, again thank you so very much for you assistance in helping me under stand how to use the MAX7219 chip in a spin object!
I will take you up on your offer to allow follow up question.
SEL (Stan Lindo)
I reactivate this old thread, because I just got a module from ebay,
And have some intermittend problems with my connecton to the prop.
The display is running from 5V.
The datasheet of the MAX7219 shows a
Logic High Input Voltage VIH MINIMUM of 3.5 Volts.
So do you drive this with pullup to 5V and DIRA instead of OUTA ??
The SPI object I tried from Tachyon is just doing normal OUTA without pullup.
Maybe this is the source of the strange behaviour.
Thanks,
Mrkus
I have a driver for 8x8 arrays but when I recently purchased some 7-segment displays with MAX7219 chips, I used JonnyMac's driver in the OBEX.
Thanks, Duane,
I am about to write a driver for TACHYON.
My question is really primarily about the hardware specs.
as the datasheet states: so I was wondering if I need to drive this with and use a pullup.
I just simply tried with OUTA and 3.3V - so I was wondering if the problem could be caused by this.
The display I have is a 8*7-segment LED.
I can check JonnyMac's driver in the OBEX now to see if he uses DIRA or OUTA.
Jon's driver actively drives the outputs (with outa). I have a lot of projects with MAX7219 chips and I always use the 3.3V logic from the Prop.
BTW, you could just use the SPIWR instruction to talk to this rather than a RUNMOD. Assuming P0 is the chip enable and you have used SPIPINS to set the pins.
: LED! ( 8b addr -- ) 8 SHL OR
: WRLED ( 16b -- ) SPIWR SPIWR 0 HIGH ;
good to know, that it 'should' work at 3.3V with OUTA
[/QUOTE]
BTW, you could just use the SPIWR instruction to talk to this rather than a RUNMOD. Assuming P0 is the chip enable and you have used SPIPINS to set the pins.
: LED! ( 8b addr -- ) 8 SHL OR
: WRLED ( 16b -- ) SPIWR SPIWR 0 HIGH ;[/QUOTE]
yes, I used SPIWR like
: LED! ( 8b addr -- ) 8 SHL OR
: WRLED ( 16b -- ) SPIWR SPIWR 0 HIGH ;[/QUOTE]
yes, I used SPIWR like
Yes, that's right, but if you use SPIWR16 there is no need for the 16 bit left justification. If you setup your pins including the mask with SPIPINS it will automatically take CE low so you only need to take it high at the end of the transfer.
6 bytes of code is all it takes to combine the address and data and clock it into the MAX7219.
8 SHL OR SPIWR16 0 HIGH
AND a DROP for the rest of the SPIWR16 needs to be added I think
Yes, that's right as the data is rotated and left on the stack afterwards which is useful for fill loops or cascading operations.