Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
Hi guys. FINALLY!!!! i've done it!! i used mikroC to compile my code and it's working! i set the timer to sleep after 10 mins, also when RB0 interrupt has been triggered, the pic will also sleep. i'll post the code hoping to help other pic newbies like me.
int timercounter = 0;
void...
Hi! thanks for the replies. i did what you guys suggested but i can't seem to make it work. why i try to make an interrupt, the least current consumption that it can come up with is 900uA. the datasheet the sleep current should be around .1uA. i'm still not losing hope.i'l still trying to alter...
hi pmar_kpj,thanks for the reply.
i did enable some interrupt in the initPic() function;GIE,PEIE and INT0IE.
in my ISR function which is interrupt intHandler(), i disabled all the interrupts i enabled during the initPic() function. Also, i cleared all the flag bits that correspond to the...
hi, i am trying to put PIC16F88 to sleep but it just won't sleep. i am using a ccx5 compiler by bknd. the controller should sleep when there's an external interrupt on RB0/INT.
#define light PORTA.0
interrupt intHandler(void) //ISR, functions that handle interrupts
{
TMR1ON = 0...
hi, i'm trying to a handle several interrupts but i don't know how to create ISR functions for them. is using an IF statement when flag bits of the interrupts are set to high will do? or do i have to do something else.
if(TMR1IF == 1) //IF TMR1 TIMER OVERFLOWS
{
timercounter++...
pin 33 is the RB0/INT,yes this is an external interrupt.if you want to enable this, set the bit INTE = 1 of your INTCON register.also RB4-RB7 of your PORTB can also act as an external interrupt. you can use it by setting RBIE of your INTCON register to 1. you can check if an interrupt happened...
i'll attach the datasheet for the nRF24L01+ here. thanks again :)
btw, i'm actually using a module for the nRF24L01+, you can find it here Transceiver nRF24L01+ Module with Chip Antenna - SparkFun Electronics
Re: timer running in background for PIC16F88
thank you, sir. the application that i will be using this set-up for is a wireless keyboard. the sleep part is for the power management of the transmitter and the pic itself. i am looking forward to your next reply. :)
regards, brew.
the data to be sent, for now, is a hex number; 0xAA. the one that triggers the PIC to send an SPI command to the nRF24L01+ is a logic high on the input pin.
the PIC16F88 is not receiving anything from the other end because i configured the nRF24L01+ as a dedicated transmitter.
for the battery...
hi bigdoggur, thanks for the reply and yes, it's a typo, i am very sorry. it's PIC16F88, i'll edit the title.
for the details, i haven't enabled any interrupt yet. when not idle, the pic is communicating with another device which is an nRF24L01+ through SPI.
i have an input pin; if high, sends...
hey enjunear, thanks for the reply. the problem for me is, the count per increment for the timer is very limited, which means that it will overflow without reaching the desired duration. i want the idle time for the pic to go to sleep is at around 10 mins and i don't know how i will reach that...
timer running in background for PIC16F88
hi guys.
i am trying to create a timer that runs in the background while the pic is doing the main program.
the flow is like this
pic is doing something, timer = reset
pic is idle, timer starts and counts until the pic does something again
when the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.