SERIN Problem

marky26uk

New Member
Hi all, just exchanged my picaxe 28x for a 28x1, now my serin is not working.
Here is my code:-
serin 7,2400,("TEMP"),b0,b1
The above worked with 28x but now with the 28x1 it doesn't receive it at all now, am i doing something wrong ?

Thanks,
Mark
 

marky26uk

New Member
serin problem

Hello again, really scratching my head here, just put the 28x back in & it's working perfectly.
I have tried two 28x1's now both different firmwares as one was bought when they first came out, it will not work.
PLEASE HELP !!!!!

Mark
 

hippy

Ex-Staff (retired)
There apeared to be a number of posts recently relating to SERIN/SEROUT on the 28X1 and 40X1. Have a look through forum search. CALIBFREQ was I believe one solution if not using an external crystal ( and it can be turned off if you are ).
 

marky26uk

New Member
Hippy once again you have helped stop a person bang his head against a wall lol.
IT WORKED !!!!!, i had to set cabfreq to -4.
I was using an external 4mhz resonator but it didn't like that so i used the internal oscillator & then set the calibfreq command.
I have a picaxe 28x outside transmitting data to my receiving station inside the house, so the 28x & 28x1 must have different timing, oh well all works sweet now.
Thanks again Hippy,

Mark

Happy Xmas & Happy New Year to all :)
 

andrew_qld

Senior Member
I had a 28X1 that would not work above 2400 baud using it's internal oscillator- a 16 MHz external resonator fixed that. I have a funny feeling that the internal (R/C ?) oscillator on the 28X1 is not as accurate as the 08M and 18x. I have never had a serial problem with these parts running at 9600 baud.
 

demonicpicaxeguy

Senior Member
with some of the internal oscilators thoughout the pic range some of them are quite good and some are just not worth running my general rule is that anything that requires presice timing i just use an external crystal or a packaged resonator after all they aren't difficult to setup
 

BrendanP

Senior Member
Internal res. is a dud.

I have 2X 40X1's running on a pcb with a GSM module. I used the internal res and had no end of trouble with serial comms to and from the GSM module. I spent about 16 hours trying different programming approaches.

I solderd on 16mghz extenal res. and the problems stopped immediately. I would never again rely on the internal res. for anything other than flashing a few LEDs or something simple like that.
 

demonicpicaxeguy

Senior Member
I have 2X 40X1's running on a pcb with a GSM module. I used the internal res and had no end of trouble with serial comms to and from the GSM module. I spent about 16 hours trying different programming approaches.

I solderd on 16mghz extenal res. and the problems stopped immediately. I would never again rely on the internal res. for anything other than flashing a few LEDs or something simple like that.
it just depends on the application the internal osccilators are still usable for quite a bit just some of them are useless for serial and high accuracy timing applications
 

BrendanP

Senior Member
For the sake of a couple of extra bits of wire on the bread board or a couple of tracks on a pcb design I'd go the external and then have the peace of mind I had that part covered.
 

steliosm

Senior Member
If you need to do serin/serout why not using the hserin on the X1 parts?
Should work better than bit-banged serin. I'm using it at 2400 baud with the SimpleLan module, which I'm querng every second and I don't have a any problems. No external crystal is attached to the 28X1.
 

hippy

Ex-Staff (retired)
For the sake of a couple of extra bits of wire on the bread board or a couple of tracks on a pcb design I'd go the external and then have the peace of mind I had that part covered.
The internal oscillator of the 28X1 seems to be as tightly spec'd as an 08M so that shouldn't be a problem, and as the problem can be solved by going from an accurate external resonator / crystal to less accurate internal clock and adjusting its speed with CALIBFREQ that suggest it's not an oscillator problem per se.

The normal advice for baud rate problems is, "use a crystal", for the 28X1 it seems to be, "don't use a crystal" !

Maybe someone should put a scope on a SEROUT line and see what bit times are actually being used ?
 
Top