Serout Problem

JAM1959

Member
Hello.I have upgraded frm 08M2 to 28x1.When I use code for 08M2 with 28x1 it prints out letters not numbers using a pot connected to circuit.Why does this happen.
 

JAM1959

Member
The circuit is frm Picaxe Getting started section with pot connected to + and - and centre pin to A0 pin 2.ADC.Code is simple adc readadc10 0,w0. Serout 0,n2400,(#w0,13,10). Pause 100. Goto main.......
 

Goeytex

Senior Member
It is likely because the 8M2 was operating at a different clock speed than the 28x1.

Does the 28X1 have an external resonator or is it using the internal clock? At what speed?

When using serout, it is a good idea to always use n2400_xx where xx is the processor clock speed

Try these:

Code:
      serout 0, n2400_8, (#W0,13,10)
      Serout 0, n2400_16, (#W0,13,10)
Make sure the terminal is set to 2400 baud
 

hippy

Technical Support
Staff member
Sounds like a processor speed change and thus a baud rate mismatch as others have described; the 'letters not numbers' are possibly the hexadecimal codes for the letters as they appear at the wrong baud rates.

However, having specified N2400, that should be the baud rate used by the SEROUT no matter whether an 08M2 or 28X1 is used.
 
Top