Go Down

Topic: Awkward Baud Rates for PICAXE (Read 2105 times) previous topic - next topic

rokison

I am trying to get my Arduino to play nice with a PICAXE LCD module (the axe 133).
It requires data to be sent in the baud format N2400,8,1 (i.e. inverted, fixed baud rate of 2400 with 8 bits data, no parity and one stop bit).
Anyone got any ideas on how to get this ti happen on a digital output?
I've tried the NewSoftSerial which allows inverted transmission, but I think it's the parity and stop bit that's causing the issues.
Any help very gratefully appreciated.

Coding Badly


http://www.picaxe.com/Hardware/Add-on-Modules/Budget-Serial-LCD-Module/

Quote
serout B.7, N2400, ("Hello")


I assume the "7" is the number of data bits.  Why do you believe the LCD uses eight data bits?


rokison

Quote
I assume the "7" is the number of data bits.


No, in fact B.7 is telling you you are using digital output pin 7 on Port B.

I have solved my issue using a bit-bashing approach, but only for non-inverting signals. This requires reprogramming the LCD module, and I would love to find a solution that is a bit neater than a bit-bashing approach if i can.

Coding Badly

Quote
I've tried the NewSoftSerial which allows inverted transmission, but I think it's the parity and stop bit that's causing the issues.


What issues?  You have not actually described the problem(s).

Why do you believe the parity and stop bits are causing the issues?

rokison

As I understand it the standard serial communication from the NewSoftSerial and indeed the SoftwareSerial Library on the Arduino is not 8,N,1 or am I mistaken.
Either way, what I got out the other end was gibberish (wrong symbols, and wrong number of symbols, implying the serial data was not getting through correctly).
I think somewhere in the PICAXE data sheet it talked of having a 5ms delay between characters, so maybe that's what's needed.

Coding Badly

As I understand it the standard serial communication from the NewSoftSerial and indeed the SoftwareSerial Library on the Arduino is not 8,N,1 or am I mistaken.


You are mistaken.  NewSoftSerial uses eight databits, no parity bit, one start bit , and one stop bit.  Very standard settings.

Quote
Either way, what I got out the other end was gibberish (wrong symbols, and wrong number of symbols, implying the serial data was not getting through correctly).


Try this...

? Disconnect power from the Arduino
? Disable the processor on the Arduino by connecting a jumper from RESET to GND
? Connect pin 0 (RX) on the Arduino to the LCD board
? Connect GND on the Arduino to the LCD board
? If the LCD is powered from the Arduino, make that connection
? Power the LCD and connect the Arduino to your computer
? Open your favourite terminal application (I suggest "Terminal by Br@y++")
? Configure your terminal application to connect to the Arduino serial port with the LCD settings (8,N,1)
? Use your terminal application to send data through the USB-to-serial converter on the Arduino to the LCD display

Does that work?

Go Up