At 06:45 AM 3/6/97 -0500, you wrote: >Hello everyone! > >How are you doing?! Iv been reading the PIC16C84 manual and Iv come up with >a few questions... Here is! > >First, about memory organization. Please tell me if Im wrong. > > - The 1K * 14 EEPROM PROGRAM memory is were my assembly program > is stored. (In binary format of course..) > > - In the DATA Memory, there is: > > - The 36 * 8 General Purpose RAM (GPR) > - And the 64 * 8 EEPROM DATA memory, what is it used for? > Hello, It's used mainly for storage of user settings, presets, anything you want to remember when the Pic is OFF, i.e if it's an AM radio your designing, you would want to remember station presets, and possibly the last listened to station so the next time you turn it on (even 100 years later) it would still be on KJAZ. >And now for the timer0 question... It says here in section 6.1 of the >PIC16C84 documentation that the TMR0 interrupt is generated when the TMR0 >register overflows from FFh to 00h. But what the does that mean? > If you want to time something, the pic has an easy way run some code when the timer runs out. So the timer counts during normal operation from 0 to FF and then it flips back over to zero. Well if you turn on the interrupt on overflow, the pic will branch to an interrupt service routine that you have written, on the reset to 0. p.s you can also use the prescaler if its counting too fast. Overall, It makes it easy to multitask other things, e.g you can set up the timer with interrupt on overflow and then go on and do other things and forget your timing something. Then on the interrupt, you would save the current state of whatever you were doing, process the interrupt, and then restore the state and RETURN to what you were doing (before you were so rudely interrupted :) >BTW, if someone has the code to drive a servo using PWD, could you please send >it to me? It would help me a lot! > Well I don't have code for that,but someone might. Seems like you just need a bunch of timing routines (you probably don't need to use the interrupt) to control it. The nice thing about the pic is all the instructions are the same amount of time (except for branches) to execute so it makes it simple to time stuff, and to count up how long a procedure might take. Instructions execute at 1/4 the clock rate. -Hamilton >Thank you in advance! >Jean-Francois >--------------- >Jean-Francois & Alain Joly >jolyal@capitalnet.com > Hamilton Feltman mailto:hamilton@budhi.com Programmer and Sound Engineer |_ _||_ . _ _ _ _ |_)(_)(_|| )| . (_ (_)( | ) http://www.budhi.com