I buyed a display, with 8 * 7segments. (Display-Link Now i try to use it in VisualBasic, but the Sample, that they have, is in Arduino-C. I just tried with a other SampleCode, but it is for a 8x8 LED Matrix
My biggest problem is, that i dont have the know-how to use the Matrix-Sample for a normal Display-Code. My target is, to Write "Netduino" on the Display
Can someone help me with that? I just have a little Code:
Imports Microsoft.SPOT.Hardware Public Class max7219 ' Command reference Public max7219_reg_noop As Byte = &H0 Public max7219_reg_digit0 As Byte = &H1 Public max7219_reg_digit1 As Byte = &H2 Public max7219_reg_digit2 As Byte = &H3 Public max7219_reg_digit3 As Byte = &H4 Public max7219_reg_digit4 As Byte = &H5 Public max7219_reg_digit5 As Byte = &H6 Public max7219_reg_digit6 As Byte = &H7 Public max7219_reg_digit7 As Byte = &H8 Public max7219_reg_decodeMode As Byte = &H9 Public max7219_reg_intensity As Byte = &HA Public max7219_reg_scanLimit As Byte = &HB Public max7219_reg_shutdown As Byte = &HC Public max7219_reg_displayTest As Byte = &HF ' Pin ports for spi Private loadPin As OutputPort Private dataPin As OutputPort Private clkPin As OutputPort ' Constructor, pass pin definitions Public Sub New(ByVal in_dataPin As OutputPort, ByVal in_clockPin As OutputPort, ByVal in_loadPin As OutputPort) ' Assign local port pins to ports passed from constructor dataPin = in_dataPin clkPin = in_clockPin loadPin = in_loadPin End Sub ' Transmits 1 byte over SPI, bitbang method Public Sub putByte(ByVal data As Byte) Dim i As Byte = 8 Dim mask As Integer While i > 0 mask = (1 << i - 1) clkPin.Write(False) If (CInt(data) And mask) = 0 Then dataPin.Write(False) Else dataPin.Write(True) End If clkPin.Write(True) i -= 1 End While End Sub ' Sends 1 Command / Data pair to a single driver chip Public Sub maxSingle(ByVal reg As Byte, ByVal col As Byte) ' LOAD low loadPin.Write(False) ' Transmit Register putByte(reg) ' Transmit Column putByte(col) ' LOAD high latches data sent loadPin.Write(True) End Sub End Class
Connection MAX7219 - Netduino (Plus)
LOAD - D10
DataIN - D11
CLK - D13
mfg
gfcwfzkm =)
Datasheet MAX7219 LED Display
MAX7219 mit 8 7seg. Anzeigen.pdf 49.82KB 4 downloads