Sign in

username:

password:



Not a member?

Search piclist



Search tips

Subscribe to piclist



piclist by Keywords

12F675 | 16F628 | 16F84 | 16f877 | 16F877A | 16F88 | 18F458 | ADC | AVR | Bootloader | CAN | CCS | CRC | EAGLE | EEPROM | ICD | ICSP | IDE | JDM | LED | Macros | Microchip | MPLAB | PCB-CAD | PIC10F | Pic12f675 | PIC16F84 | PIC16F84A | PIC16F877 | PIC18 | PIC18F452 | PicBasic | PICC | PICSTART | PWM | RS-485 | RS232 | SMT | SPI | UART | USART | USB | Wireless | Wisp628 | Xilinx

Ads

Discussion Groups

Discussion Groups | Piclist | Re: timer pic

A discussion group for the PICMicro microcontroller. Also called the Microchip PIC, this list is dedicated to the use and abuse of this fine, simple, microcontroller. Close to topic posts are welcome, ie. general electronics.

timer pic - randy ram - May 18 13:01:37 2006

Has anyone tried this before?

I want to use say the PIC12 to count down to say 24 hrs or any time
given the light up a LED. Then loop back again start counting again.
A none ending loop till I pull out the supply.

Thanks

--
___________________________________________________
Play 100s of games for FREE! http://games.mail.com/


(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )


Re: timer pic - Lez - May 18 13:15:43 2006

yes, but usually the timeperiod is one second, and I often check pics that
way.....
On 18/05/06, randy ram wrote:
>
> Has anyone tried this before?
>
> I want to use say the PIC12 to count down to say 24 hrs or any time given
> the light up a LED. Then loop back again start counting again. A none ending
> loop till I pull out the supply.
>
> Thanks
> --
>
> ___________________________________________________
> Play 100s of games for FREE! http://games.mail.com/
> to unsubscribe, go to http://www.yahoogroups.com and follow the
> instructions
>
> SPONSORED LINKS
> Microcontroller
> Microprocessor Microchip
> pic
> Microcontrollers
> Picmicro 8051
> microprocessor
> ------------------------------
> >.
> ------------------------------
>

--

Lez



(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )

Re: timer pic - n0qbh - May 18 18:52:24 2006

--- In p...@yahoogroups.com, "randy ram" wrote:
>
> Has anyone tried this before?
>
> I want to use say the PIC12 to count down to say 24 hrs or any time
> given the light up a LED. Then loop back again start counting again.
> A none ending loop till I pull out the supply.
>
> Thanks
>
> --
> ___________________________________________________
> Play 100s of games for FREE! http://games.mail.com/
>
You need to divide the total length of time by the resolution of your
inc/dec delay and use that number as either a starting or ending point.
For example 12 hrs total time and 1 second delay gives 43,200.
If it's a start point you'd count down from that number decrementing
by 1 until you reach zero at which point you turn on the LED.

This type of project will make a good learning experience.
Good luck



to unsubscribe, go to http://www.yahoogroups.com and follow the instructions



(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )

RE: timer pic - Scott Kellish - May 18 19:14:23 2006

Sure, you generate a timer interrupt, say every 10ms and then use software
based counters to divide down from there. For example, using the 10ms timer
interrupt, you get 100 interrupts per second. There are 86400 seconds in 24
hours. That's 3 bytes. Take the time period you wish to elapse before
toggling the light, convert it to seconds, store it in the 3 bytes, and
decrement the count by one every second. Once it reaches zero, toggle the
light and start over.

Scott Kellish

-----Original Message-----
From: p...@yahoogroups.com [mailto:p...@yahoogroups.com] On Behalf Of
Lez
Sent: Thursday, May 18, 2006 1:13 PM
To: p...@yahoogroups.com
Subject: Re: [piclist] timer pic

yes, but usually the timeperiod is one second, and I often check pics that
way.....

On 18/05/06, randy ram wrote:

Has anyone tried this before?

I want to use say the PIC12 to count down to say 24 hrs or any time given
the light up a LED. Then loop back again start counting again. A none ending
loop till I pull out the supply.

Thanks
--

___________________________________________________
Play 100s of games for FREE! http://games.mail.com/

to unsubscribe, go to http://www.yahoogroups.com and follow the instructions

SPONSORED LINKS
Microcontroller
icroprocessor&w3=Microchip+pic&w4=Microcontrollers&w5=Picmicro&w6=8051+micro
processor&c=6&s=121&.sig=3HIONbN65Uz0AArNWO5H5w>

Microprocessor
croprocessor&w3=Microchip+pic&w4=Microcontrollers&w5=Picmicro&w6=8051+microp
rocessor&c=6&s=121&.sig=tyMPnS8yQ-CUjoNgNb8fWg>

Microchip
roprocessor&w3=Microchip+pic&w4=Microcontrollers&w5=Picmicro&w6=8051+micropr
ocessor&c=6&s=121&.sig=RYGK0y_3LxG50wzGCze0Cw> pic
Microcontrollers
Microprocessor&w3=Microchip+pic&w4=Microcontrollers&w5=Picmicro&w6=8051+micr
oprocessor&c=6&s=121&.sig=Arg75qRHWecybJVK6qBtQw>

Picmicro
cessor&w3=Microchip+pic&w4=Microcontrollers&w5=Picmicro&w6=8051+microprocess
or&c=6&s=121&.sig=IoyUNX-JQoomVropBE6S7w>

8051
w2=Microprocessor&w3=Microchip+pic&w4=Microcontrollers&w5=Picmicro&w6=8051+m
icroprocessor&c=6&s=121&.sig=MqW2fT2sChzkgKY7D6r5Pg> microprocessor

_____

> Terms of Service.

_____

--

Lez

to unsubscribe, go to http://www.yahoogroups.com and follow the instructions

SPONSORED LINKS
Microcontroller
icroprocessor&w3=Microchip+pic&w4=Microcontrollers&w5=Picmicro&w6=8051+micro
processor&c=6&s=121&.sig=3HIONbN65Uz0AArNWO5H5w>

Microprocessor
croprocessor&w3=Microchip+pic&w4=Microcontrollers&w5=Picmicro&w6=8051+microp
rocessor&c=6&s=121&.sig=tyMPnS8yQ-CUjoNgNb8fWg>

Microchip
roprocessor&w3=Microchip+pic&w4=Microcontrollers&w5=Picmicro&w6=8051+micropr
ocessor&c=6&s=121&.sig=RYGK0y_3LxG50wzGCze0Cw> pic
Microcontrollers
Microprocessor&w3=Microchip+pic&w4=Microcontrollers&w5=Picmicro&w6=8051+micr
oprocessor&c=6&s=121&.sig=Arg75qRHWecybJVK6qBtQw>

Picmicro
cessor&w3=Microchip+pic&w4=Microcontrollers&w5=Picmicro&w6=8051+microprocess
or&c=6&s=121&.sig=IoyUNX-JQoomVropBE6S7w>

8051
w2=Microprocessor&w3=Microchip+pic&w4=Microcontrollers&w5=Picmicro&w6=8051+m
icroprocessor&c=6&s=121&.sig=MqW2fT2sChzkgKY7D6r5Pg> microprocessor

_____

> Terms of Service.

_____


(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )