paulfjujo
Advanced Member level 4
- Joined
- Jun 9, 2008
- Messages
- 1,461
- Helped
- 296
- Reputation
- 592
- Reaction score
- 280
- Trophy points
- 1,363
- Location
- France 01800
- Activity points
- 10,476
Hello,
I made a test to evaluate the sleep mode with a PIC12F1840
I used WDT timeout to wake up at every 34 secondes
After deeply reading the datasheet , i fund that after going in "sleep mode"
to wake up the MCU by incomming carcatere on UART, it needs a special caractere
"BREAK car" wich is made of all bits at 0 value.. so car =0x00.
I tried this solution and fund it doesn't works every times.. so i sended 2 car at 0 values
to be sure to go out sleep mode.. and it's works !
I don't know wile i need to send 2 car (0 value)..maybe because FiFo in UART Hardware ?
My first test was not a good example , because the main consumption is the LCD 4x20 + Backlight
(with this LCD, we can't see anything without back light!)
so for this case, i added an external circuit with a Mosfet to drive the BackLight Led
with is the main consumption (~30mA).
My PIC (DIP8) doesn't have any extra output (i allready use UART + I2C => 4 pins)
because the remaining pin RA3 can only be used as input ..
another way : use of TX output to drive the mosfet. in my software i allways send echo when i receive
a carcaterer (Break or other commande)..
in the main loop, i also sens ADC measure to UART..
so LCD backlight is ON every time i send a commande to the PIC trough UART ( via PC terminal)
or when it goes out of sleep, after WDT elapsed time.
link to this test ( Hardware & software mikroC )
nota: i don't have ISIS simultaor , so only real world to test it.
My question :
I know , i have to do another test to see the effect of sleep mode
concerning the lowest main consumption...
Does someone allready use the wake up by incomming car on UART ?
is it by a similar way i used ? or other..
I made a test to evaluate the sleep mode with a PIC12F1840
I used WDT timeout to wake up at every 34 secondes
After deeply reading the datasheet , i fund that after going in "sleep mode"
to wake up the MCU by incomming carcatere on UART, it needs a special caractere
"BREAK car" wich is made of all bits at 0 value.. so car =0x00.
I tried this solution and fund it doesn't works every times.. so i sended 2 car at 0 values
to be sure to go out sleep mode.. and it's works !
I don't know wile i need to send 2 car (0 value)..maybe because FiFo in UART Hardware ?
My first test was not a good example , because the main consumption is the LCD 4x20 + Backlight
(with this LCD, we can't see anything without back light!)
so for this case, i added an external circuit with a Mosfet to drive the BackLight Led
with is the main consumption (~30mA).
My PIC (DIP8) doesn't have any extra output (i allready use UART + I2C => 4 pins)
because the remaining pin RA3 can only be used as input ..
another way : use of TX output to drive the mosfet. in my software i allways send echo when i receive
a carcaterer (Break or other commande)..
in the main loop, i also sens ADC measure to UART..
so LCD backlight is ON every time i send a commande to the PIC trough UART ( via PC terminal)
or when it goes out of sleep, after WDT elapsed time.
link to this test ( Hardware & software mikroC )
nota: i don't have ISIS simultaor , so only real world to test it.
My question :
I know , i have to do another test to see the effect of sleep mode
concerning the lowest main consumption...
Does someone allready use the wake up by incomming car on UART ?
is it by a similar way i used ? or other..