axe133 not hwserial...

I just received my rev-ed's stuff and started to work with the 18M2 combined with the AXE133y (OLED)
First.. Yes! The OLED looks incredible (once you go... :) )

First thing to do was to alter the code to 9600 baud... A simple "hello world" program worked fine on 2400 baud but not for 9600.

I guess the current port is not working on 9600_16 ? The Editor let me set it without complains

Isn't it a pity port C2 is not used for the serial in? I guess there's a good reason but maybe it's an idea for AXE133 Version II ?

Anyway, I only need 9600 to connect the Vmusic. I will handle the LCD (Sorry... OLED) in 2400
Just wondering why it doesn't work
 
Last edited:
It's the fixed input for hwserial

I need to sort out the problem though. he Vmusic is working on 9600 too...

Did you do anything special to make it work or only the baudrate to 38400_32 (in your case)
 

nick12ab

Senior Member
You can use the setfreq command to change the speed of the PICAXE. With your testing, start off by just leaving everything the same as the original except change setfreq m16 to setfreq m32 and see if it works on 4800 baud (which it will automatically be because the operation speed has doubled) then try 9600.

With the hardware serial, the 18M2 only has a two byte buffer so the overhead of reading the buffer may exceed that of using normal serin.
 
OK, thanks. I'll try tomorrow.
As for the speed. The Vmusic has CTS and DSR handshaking. I plan to pulse out a CTS as soon I get a high DSR the moment the Picaxe is ready for it.

But. On a 18M2, the baudrate will then be set as 9600_32 ... true?
 

westaust55

Moderator
On a 18M2, the baudrate will then be set as 9600_32 ... true?
Yes, if you have set the PICAXE clock speed with
SETFREQ m32

then for SERIN and SEROUT at 9600 baud you must use the bard rate parameter
N9600_32 or T9600_32

and for HSERIN and HSEROUT, the HSERSETUP command would require the parameter
B9600_32
 

marks

Senior Member
Hi Erik,
the best i could do with an 18m2 is 4800 baud.

At higher speeds example.
9600 baud you need a PAUSE 1 between each byte sent so the 18m2 can keep up lol!
 

srnet

Senior Member
It's the fixed input for hwserial
Dont you mean port B2 ?

Myself I would see no particular reason for the default code to switch the AXE133Y from soft UART (current setup) to using the hardware serial port, it works well enough as it is.

Although as I did its not difficult to customise.
 

srnet

Senior Member
Did you do anything special to make it work or only the baudrate to 38400_32
I added some delays for the character writes.

It was part of a project I did, the code is here;

http://www.picaxeforum.co.uk/showthread.php?20059-Portable-Magic-Morse-Decoder

I wanted to decode incoming Morse audio and send received characters out to the OLED without impacting the timing of the Morse decode, thus I wanted the OLED to operate at the highest speed. I just added some delays for the character writes and display clears.
 

hippy

Technical Support
Staff member
Isn't it a pity port C2 is not used for the serial in? I guess there's a good reason but maybe it's an idea for AXE133 Version II ?
That would be Pin B.2 as srnet notes. Using that for serial input would prevent port B being used as a byte-wide output port to the LCD, would require more complicated code to do bit moving and take longer to execute.

Also note the 18M2 does not support polarity inversion for HSERIN serial due to its silicon design so it can only be used with Txxxx baud rates or requires additional hardware to invert the signal to use Nxxxx baud rates.
 
Top