comma's

senyabeb

New Member
18m2

Using serin c.1 ("X"),n2400, b0,b1,b2

returns ( for serin c.1 "X", P,Q,R ) 44,80,44

It ( I think) used to return 40,41,42 so to get 3 characters in we need serin c.1 ("X"),n2400, b0,b1,b2,b3,b4,b6 and ignore b0,b2,and b3

Was it always like this ???
 

hippy

Ex-Staff (retired)
It looks like you may have a baud rate mismatch which is corrupting the data received.

The results you are showing are probably correct for what was received and it is the way in which you are seeing and showing those values which makes them six digits rather than three characters.

You only need to receive in to three variables, not six; it is just that the values representing the characters are incorrect.
 

lbenson

Senior Member
... Using serin c.1 ("X"),n2400, b0,b1,b2
This can't be what your program has, because you're missing a comma after "c.1" and you have the qualifier and baud rate swapped. Best to cut and paste code so we can see exactly what the PICAXE is trying to do.

Ascii 44 (in decimal) is a comma; 80 is "P", so what you are receiving is (if supposed to represent ascii characters): ",P,"

Exactly what do you expect?

There seem to be some hints in your statement "returns ( for serin c.1 "X", P,Q,R ) 44,80,44 ", but I don't understand. (This may be a red herring.)
 

westaust55

Moderator
Also, unless you are running the PICAXE chip at the default baud rate (4 MHz for M2 parts) then you will need to include a suffix on the end of the baud rate to indicate the clock speed and correctly set the baud rate.

For example, if you have
SETFREQ m8
then the baud rate suffix is “_8”
so you would have in full
N2400_8.

What is the source of the serial data?
You may need “T” for True polarity
As opposed to “N” for iNverted.
 
Top