4 Digit, 7 Segment Display – Part 2 – Ouput an Unsigned Short
Update 18 March 2011: This is where this series of posts finishes for the minute as I appear to have fried the MAX7219 (or something else is wrong with the setup) as I can send commands to it but the output does not make any sense. I’ll have to return to this series when I have a new chip.
This is the second in a series of posts discussing the MAX7219 LED driver chip being used to drive a four digit, seven segment LED display. The series is made up of the following posts:
- Part 1 – Output a Byte
Output a series of bytes from the Netduino Plus using the SPI protocol - Part 2 – Output an Unsigned Short (This Post)
Similar to the first post but this time we will write a series of short integers using SPI. This will also start to implement the code which will write the data to the MAX7219 chip. - Part 3 – Displaying Numbers
Using the MAX7219 class to display a number on the display - Part 4 – Displaying Sensor Data
Hooking up a sensor to the Netduino and displaying the reading from the sensor.
Objective
The objective of this post is to start to flesh out the code (which will be presented in the final post) to start to send commands in the form of 16 bit unsigned shorts to the MAX7219.
All of the hardware remains as before and only the software changes. As before, the logic analyser is used to verify the results.
Software
The software required a minor update to convert the output to an array of ushorts and put the register in the msb and the data in the lsb.
Results
The main program does little more that send two commands to the logic analyser, namely a command to enter normal operation followed by a command to restrict the number of digits to four.
The results can be seen here:
This image shows the command to restrict the display to four digits being sent over the SPI bus.
The next step is to complete the wiring and to start to send display data to the MAX7219.
Tags: Electronics, Netduino
Tuesday, March 15th, 2011 at 4:40 pm • Electronics, Netduino • RSS 2.0 feed Both comments and pings are currently closed.