4 digit led rs232 display

Hi guys,I have got a display as above from edi displays( http://www.electronicdisplays.com/products-detail.asp?productNumber=21) . I am using an arduino uno and a rs232 shield from dfrobot. I got a test program from the net and modified it slightly, I wanted the display to update the time just over every second to test it.

void setup() { Serial.begin(1200);

} void loop() { unsigned int raceTime; raceTime =millis();


Serial.println(raceTime/1000.00); delay (1023); } }

the transmission protocol for the display is 1200 Baud,8 data bits,1 stop bit,no parity.

The display works the first time giving me the seconds and hundredths as i wanted, but as the program cycles it stays with the first time displayed. If I open serial monitor then I can see the times being updated as I want, but it doesn't happen on the external diplay. I'm new to arduino so any help would be greatly appreciated, hopefully its just something silly. Thanks in advance.

You should use an unsigned long variable for millis(). The unsigned int will only store 65.535 seconds before rolling over.

Did you read the protocol manual? http://www.electronicdisplays.com/database/files/PLC_Communication_Options_for_Electro_136890375.pdf

You are apparently supposed to send a Start of Text (STX) character (0x02) and two address digits ("01") before your data and an End of Text (ETX) character (0x03) after the data.


Thanks John, that worked perfectly.I read it needed the start text and end text character but did not know how to code it. Thanks Again.