hibernate and serout

kalbun

New Member
I stumbled in a strange behaviour of Picaxe 28-X1. Try this code:

setfreq m_8
main:
hibernate 300
high 2
hibernate 300
low 2
' serout 3,T1200_8,("0000000000000000000000000000000000")
hibernate 300
high 2
goto main

If the serout instruction is commented, everything works and line 2 toggles each time the processor wakes up. When something goes out on the serial line, the processor stops at the THIRD hibernate and never wakes up.

I looked in the forum to see if someone else experienced the same problem but did'nt find anything... very strange.:(
Can someone help me? Tks

--k
 
Last edited:

kalbun

New Member
My problem is still there....

No answer?
No one else ever experienced the same problem mixing hibernate and serout?
:eek:

If someone was able to make serout working on a picaxe 28x1 after waking up from a hibernate, please let me know.

Tks
--k
 

moxhamj

New Member
Re "No one else ever experienced the same problem mixing hibernate and serout?"

I don't have a 28X1 so sorry, can't test. Someone will probably post soon.
 

Jeremy Leach

Senior Member
Hi, can you clarify exactly which hibernate it stops at? If it's the second then that's before the serout ?? I'm not saying I know the answer but just want to get this clear...

I mean, are you saying: You include the serout command, you power up, Out2 goes high, then Out2 goes low then you get the serout, then it stops? Can you detect the serout working?

Plus, what if you reduce the '000' in your string ??
 
Last edited:

muckypups

Member
Have you tried it with the high 2 command before the final hibernate ?
You could recode like this :

setfreq m_8
main:
hibernate 600
high 2
hibernate 300
low 2
serout 3,T1200_8,("0000000000000000000000000000000000")
high 2
goto main

Maybe the serout interferes with hibernate when 2 is low.

Guessing ....

Alan
 

Technical

Technical Support
Staff member
How are you waking up from the hibernate - i.e. what RC values are you using on ADC0? Do you really mean to use hibernate (not nap?) - if ADC0 is floating you will get strange results like this.
 

kalbun

New Member
How are you waking up from the hibernate - i.e. what RC values are you using on ADC0? Do you really mean to use hibernate (not nap?) - if ADC0 is floating you will get strange results like this.
Hello, thanks everybody for your messages! Sorry for the long silence, I was away a couple of days.

To correct my original message, the problem appears when calling hibernate AFTER calling serout (so in the sample code the uP hangs at the third hibernate).

Concerning the wakeup, I'm using the "manual wakeup" circuit described @page 55 on Picaxe manual 1. I need to use hibernate to put the uP in low power mode and wake it up only if a certain external event happens.

--k
 
Top