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 | PicBasic - TMR0 16F877

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.

PicBasic - TMR0 16F877 - dino308gt4 - Oct 30 17:24:00 2002

I'm using PicBasic and my project requires taking an analog reading
every 100th of a second.
Is using TMR0 the best way to do the timing?
It looks like the prescaler ratios do not make it possible.





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


Re: PicBasic - TMR0 16F877 - Vasile Surducan - Oct 31 1:56:00 2002


Even is written on picbasic or not, you have at least two good options:

a. tmr0 with rollover, it works with a good prescaler and tmr0 initial
value "100th of a second" 1/100 = 10mS
b. tmr0 in free running, start tmr0 and count the number of counts (
including prescaler ) until the tmr0 is equal with a comparison number.
( you have to count also the delay need for comparison by extra
instructions )

regards,
Vasile
http://www.geocities.com/vsurducan On Wed, 30 Oct 2002, dino308gt4 wrote: > ________________________________________________________________________________
> Note: The author of this message has chosen not to reveal an email
> address. You won't be able to reply to the author directly.
>
> ________________________________________________________________________________
>
> I'm using PicBasic and my project requires taking an analog reading
> every 100th of a second.
> Is using TMR0 the best way to do the timing?
> It looks like the prescaler ratios do not make it possible. > Yahoo! Groups Sponsor
> ADVERTISEMENT
>
> to unsubscribe, go to http://www.yahoogroups.com and follow the
> instructions
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.




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