sfe 7 segment serial display with TTL serial need help

Your source for all things Atmel.

Moderator: phalanx

Post Reply
wpongp
Posts: 1
Joined: Sun Oct 18, 2009 10:09 am

sfe 7 segment serial display with TTL serial need help

Post by wpongp » Sun Oct 18, 2009 10:24 am

Hi, I am new to Arduino and just bought a 7 segment serial display this week. http://www.sparkfun.com/commerce/produc ... ts_id=9230

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.

Below is my code now:

Void Setup(){
Serial.begin(9600);

pinMode(11, OUTPUT);
}


Void loop(){

Serial.write(0x02);
Serial.write(0x03);
Serial.write(0x04);
Serial.write(0x05);

}

I really have no idea with my coding.
Thank you in advance!

JimEli
Posts: 30
Joined: Sat Jan 24, 2009 3:28 pm
Location: USA

Post by JimEli » Sat Oct 24, 2009 7:21 am

...
Last edited by JimEli on Fri Jan 14, 2011 8:04 am, edited 1 time in total.

leunghoming
Posts: 3
Joined: Tue Nov 24, 2009 7:01 am
Location: Hong Kong

Post by leunghoming » Thu Nov 26, 2009 9:00 am

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?
My VB.Net code as follows:

Code: Select all

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

Sheepdog
Posts: 45
Joined: Mon Jun 21, 2010 1:47 am
Location: UK and CT, USA
Contact:

Re: sfe 7 segment serial display with TTL serial need help

Post by Sheepdog » Fri Aug 13, 2010 8:54 am

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.

http://www.arunet.co.uk/tkboyd/ec/ec1led4x7ser.htm
Arduino "How To"s at http://bit.ly/ArduHowTo

Post Reply