i've got about 10 books on pic but have not found any info the "right" way. all are just about the same. there should be some book which explains theory and applications/examples also. its not easy to for everyone to imagine all possible uses of a peripheral. if you have any specific suggestions please do let me know. On Sun, Oct 18, 2009 at 12:36 AM, Tamas Rudnai wrote: > (added [PIC] tag to the subject so everyone have a chance to see your post) > > ---------- Forwarded message ---------- > From: ___ ___ > Date: Sat, Oct 17, 2009 at 8:24 AM > Subject: square wave LED lighting & other questions > To: piclist@mit.edu > > > > hi, i am new around here. i want to know more about how an led can be lit > > when the input is a square wave (fed to pic via RB0/int) and the led has > to > > be lit with a high pulse of square wave and is off when pulse is low. > > so logic 1 on square wave = LED on > > logic 0 on square wave = LED off > > i also need to know whether this sort of an app will require the use of > > interrupt on rising edge feature only or timers as well? > > You do not even need a PIC for this, ony a transistor. > Anyway, the basic idea is that you can configure your ports as either > input or output. So you configure one port as input to listen to your > signal, then another one as an output to drive an LED. You can use > polling method to see if a signal changes on the input, like keep > monitoring the input in tight loop, or you can use an interrupt -- but > I think for now you would need to concentrate on the polling method. > > > > > a textual or code explanation will do. thanks and looking forward to. > > > > 2. how is the ADC result is used when its finally converted? i mean, how > to > > use the 10 bit result to do something? some code explanation will do. > > > > 3. do interrupts and timers always have to work together? > > Have you seen the PIClist's Techref yet? > http://www.piclist.com/techref/microchip/index.htm > > Also I think Mikroelektronika's free online books are quite good to start > with: > http://www.mikroe.com/en/books/ > There are many good texts about your questions and code / schematics > examples as well. > > > Tamas > -- > /* www.mcuhobby.com */ int main() { char *a,*s,*q; printf(s="/* > www.mcuhobby.com */ int main() { char *a,*s,*q; printf(s=%s%s%s, > q=%s%s%s%s,s,q,q,a=%s%s%s%s,q,q,q,a,a,q); }", > q="\"",s,q,q,a="\\",q,q,q,a,a,q); } > > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist