Instead of using SPI, I would like to use TTL level communication to control my display and my arduino is ATMega328. The wiring is easy, VCC to pin11, GND to GND and RX to TX(arduino).
I was told to use Serial.write() to display numbers but not succeed yet.
After hours of struggling, I’d like to ask your kindly help to help me with the coding. At this first stage, I just want to display four digits mannually.
I am also new user of 7 segment serial display just bought on last week, I will try to use PC’s RS232 port to connect the display and program by VB.Net.
Its always indicate “0000”, did you have any sample code for me to work with the 7 segment serial LED display?
Imports System.IO.Ports
Imports System.Text
Public Class frmMain
Dim RS232 As SerialPort
Private Sub frmMain_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
RS232 = New IO.Ports.SerialPort("COM1", 9600, 0, 8, 1)
RS232.Open()
End Sub
Private Sub frmMain_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
If RS232 Is Nothing OrElse Not RS232.IsOpen Then
Exit Sub
End If
RS232.Close()
RS232 = Nothing
End Sub
Private Sub btnSend_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSend.Click
Dim xmtSend() As Byte = {&H31, &H32, &H33, &H34}
RS232.Write(xmtSend, 0, xmtSend.Length)
End Sub
End Class
I’ve created a little “getting started” guide for these neat, inexpensive ($13) modules. It is specifically useful to Arduino users, but others should find lots of useful information in it for their needs, too.