How do I use n9600 ?

donrecardo

Senior Member
Hi
I have an axe033 which works fine with lines like

serout 6,n2400 ......... etc

I have now bought two more serial to lcd modules ( not axe033)

The new modules will operate in both I2C and serial.
When using serial I can choose 2400, 4800, 9600 and 19200 bit/sec
but it defaults to 9600 on power up

Just running through the simulator for now I tried running my normal serial line
but with the speed at 9600

i.e. serout 6,n9600, ...... and the simulator wont have it .
It accepts n2400 and n4800 but n9600 it thinks is an unknown symbol ?

If I could get it to run at 9600 I could tell it to change baud rate to 2400 and then it will run my old code ok but at the moment as it wont accept 9600 I dont see how I will communicate with it . Have I missed the point somewhere ? :confused:

BTW I am running a Picaxe 40X1 with no external resonator and
the serial lcd interface data sheet is here ... http://www.web4robot.com/files/SerialLCDCtrl.pdf

Don
 

westaust55

Moderator
SEROUT at 9600 Baud

Read the Manual 2 page 167 about the SETFREQ command to adjust the PICAXE clock sped..
Then read the SEROUT command on page 158. There are tables on page 158 which show what keyword to use for the desired comms speed relative to the clock speed.

Might also help to know which PICAXE chip you have.

Edit:
Then also have a read of the atatchements to posts 1, 13 and 15 here:
http://www.picaxeforum.co.uk/showthread.php?t=11260
 
Last edited:

Texy

Senior Member
Good advice from Westy as usual, but he got bored nearing the end of the post where he missed that the OP was using a 40X picaxe chip;)

Texy
 

tiscando

Senior Member
the picaxe cannot serout at n4800_4 at 4MHz clock speed. Therefore, you need to set the clock speed to 8MHz with "setfreq m8", and then use "serout pin, n9600_8, (...).
 

westaust55

Moderator
9600 Baud at 4 MHz

tis,
it can do (for some parts).

please read PICAXE Manual 2 page 158 last line of the second table for PICAXE chips "other than for 08 / 08M / 18 / 18A / 28 / 28A parts".

the underscore four ( _4) part indicates that speed keyword is for 4MHz operation
 

westaust55

Moderator
Good advice from Westy as usual, but he got bored nearing the end of the post where he missed that the OP was using a 40X picaxe chip;)

Texy
:eek:

Not boredom Texy, mebbe my mate Al getting involved . . . . :eek:


. . . . . Alzheimer's , that is :rolleyes:
 
Top