Flowcode SPI component to max7219

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
rider
Posts: 9
Joined: Sat Oct 06, 2012 6:54 pm
Contact:

Flowcode SPI component to max7219

Post by rider »

Hi members,
I want to send my frequncy counter data from flowcode5 to seven segment LCD driver Max7219. The LCD displays are 3 nos. Each 6 digits. The MCU is 16f877A with SPI interface. I am new to this interface. I appreciate if someone helps me how to use the SPI component in FC to output the segment information.

regards
rider

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Re: Flowcode SPI component to max7219

Post by kersing »

1) The MAX7219 is an LED driver, not an LCD driver.
2) Could you sign up for the Flowcode 5 forum and post over there?

To drive the MAX7219:

First you need to connect the appropriate PINs for SPI and a generic I/O pin for LOAD. Each MAX7219 needs a different I/O pin for LOAD to enable addressing them individually.

Generic way to do this:

Code: Select all

Set all LOAD pins high
SPI_Init()
Drive LOAD pin low.
If you want to use decode mode:

Code: Select all

SPI_Send_Char(0x09)
SPI_Send_Char(0xFF)
To display a digit:

Code: Select all

SPI_Send_Char(address in lower nibble)
SPI_Send_Char(digit to display according to table 5 or 6)

Drive LOAD pin high.
For each digit you want to display you repeat:

Code: Select all

Drive LOAD pin low.
SPI_Send_Char(address in lower nibble)
SPI_Send_Char(digit to display according to table 5 or 6)
Drive LOAD pin high.
With the appropriate LOAD pin, address and digit information.
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

rider
Posts: 9
Joined: Sat Oct 06, 2012 6:54 pm
Contact:

Re: Flowcode SPI component to max7219

Post by rider »

Hi Kersing,
Thankyou for the support. Could you please give me an simple example of how this is implemented in FC flowchart.

Rider

Post Reply