Setfreq m16 on a 28x2...

MartinM57

Moderator
...doesn't seem to have any effect - when measured by whether it changes the baud rate of sertxd/hserout.

Other values work as expected (I tried m4 and m8) i.e. at m4 the baud rates are 4800 and at m8 they are 9600.

But m16 still results in 9600.

(EDIT: yes, I'm using the appropriate constants in hsersetup...)

No external resonator and manual 2 suggests m16 is a valid vale for the X2.

Any ideas?

PS. hsersetup baudrate, %00000111 is fantastic! I've got two USB cables coming from my PC (one from the PE, one from Bray's terminal), two download circuits (one into serin/out, one into hserin/out) and can do background comms to the scratchpad and on the fly re-programming without a MAX232 in sight or swapping any cables/jumpers. Well done Rev-Ed :)
 

eclectic

Moderator
@Martin.

I've just tried this program using 2 different 28X2,
"Standard" and 3volt version.

Checked the values on a 'scope.

Only the 3volt runs at 16MHz.
(As manual 2, page 183)

Code:
#picaxe 28x2


main:
setfreq m4
pwmout C.1 , 99, 200
wait 5


setfreq m8
pwmout C.1 , 99, 200
wait 10

setfreq m16 ; only works with 3v version
pwmout C.1 , 99, 200
wait 20

goto main
e
 

MartinM57

Moderator
@Martin.
Only the 3volt runs at 16MHz.
(As manual 2, page 183)
I've been staring at page 183 for 5 minutes since I read your post - and I've only just spotted it. I was reading the table from the bottom up, saw "28X2, 40X2 (3V) ... m16" and assumed that the 3V meant the 3V 40X2 and that 28X2 meant 28X2 ;)

A small improvement to the manual would be "28X2 (3V), 40X2 (3V) ... m16"

Thanks, all is now clear....
 
Top