Sid Weaver wrote: > I understand it is possible to write a program using Timer 0 or Timer > 1 that runs in the background and generates a square wave. I need a > square wave at 100 Hz 50% duty cycle to pulse large LCDs. > > Can some one tell me how to do this using PBasic, since I don't know > Assembly. I have the F870, F873, F876 and F877. Note: [PIC]: tag added to subject. Sounds like an excellent job for the on-chip PWM module which uses Timer 1. Although it produces ASM code, have a look at the absolutely brilliant "PWM calculator" program thant Tony Nixon posted here just last week. At the very least it will give you a good understanding on how the PWM module works. Tony Nixon wrote: > I just posted a PIC PWM calculator for Windows if anyones interested. > > Set the PWM how you want it and the code is copied to the clipboard > ready for pasting into your ASM file. > > http://www.bubblesoftonline.com/demo/picpwm.zip -- Brent Brown, Electronic Design Solutions 16 English Street, Hamilton, New Zealand Ph/fax: +64 7 849 0069 Mobile/txt: 025 334 069 eMail: brent.brown@clear.net.nz -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads