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
Flowcode SPI component to max7219
-
- 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
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:
If you want to use decode mode:
To display a digit:
For each digit you want to display you repeat:
With the appropriate LOAD pin, address and digit information.
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.
Code: Select all
SPI_Send_Char(0x09)
SPI_Send_Char(0xFF)
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.
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.
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis
Re: Flowcode SPI component to max7219
Hi Kersing,
Thankyou for the support. Could you please give me an simple example of how this is implemented in FC flowchart.
Rider
Thankyou for the support. Could you please give me an simple example of how this is implemented in FC flowchart.
Rider