Hi all, Ok, as I continue to ply the waters of embedded C, I have a few more questions. I realize I should have saved the header file question I had last night and just made a list. First off, I wish I hadn't waited so long to give this a try. I am having a great time with this, it's quite a bit of fun! 1. Are variables usually declared as global or in the correct scope? I am struggling with what's the best practice here. For example, say I have a variable that I increment only in the ISR, so technically I should probably declare it in the ISR. I don't know exactly how the compiler allocates memory, is it even possible that it could allocate and free memory when entering or exiting a function? 2. I believe context saving is handled automatically for the ISR. What if using multiple interrupt priorities? 3. In regular C, the goto keyword is frowned on as it makes program execution hard to follow. Is this the case in embedded C as well? I haven't found much info with the searches I've been doing. Most of my current code in assembly uses gotos all over the place, but I understand that C removes the restrictions imposed by things like a decfsz, in that I can execute more than a single line after, or make these into function calls. 4. I have been looking at the PIC18 Peripheral Library Help Document, which came as a PDF when I installed XC. It details a number of macros that look like they would help dealing with peripherals. Is that something that people frequently use? I admit, configuring some peripherals can be a bit confusing (ie on the 18f25k22, configuring PORTB weak pull ups requires you to know that the enable is actually in INTCON2), and presumably the macros help with that. That said, I come from an assembly background, so I'm used to dealing with individual registers and bits. What's the better practice? Some of the SPI ones seem interesting, but I can't find much info on them. For example, none of the documentation I've read yet tells me if putsSPI() uses interrupts. I would guess no, but how can I tell? I'm sure there will be more questions as I keep exploring, but this is a st= art! Thanks! Josh --=20 A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools. -Douglas Adams --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .