Due to popular demand… I made up this list of all the on chip peripherals available for use as the chip is implemented in the '07 rc, and listed the page numbers where you can find info in the User’s Manual available here:
> 2 UARTS - Hardware Serial Ports - One is brought out to the Program port, the other is connected to the TTL port. (page 249)
> 2 CCPs and 3 ECCPs - (Enhanced)Capture/Compare/PWM modules - Four of the CCPs are brought out to pwms 13-16. Because of this, the ‘Capture’ mode for the (e)ccps cannot be used since the procesor’s pins sit behind a signal driver on the PWM pins. Programmers can still use these pins for output and generate their own pwm signals, either using the hardware setup for pwm (the rate is too high to drive a victor, so be careful) or can be used in conjunction with another CCP serving as a timebase to generate a razor-sharp high accuracy SIXTEEN BIT pwm signal… being sixteen times the resolution of a standard pwm. The ‘Compare’ mode of the PWM serves as a kind of hardware equality test for a timer, interrupting on a given value for a timer. Keep in mind TMR3CON holds the bits that direct which CCPs can view which timer’s values, also remember that the best way to use a ccp is to never reset, stop, or set the timer’s value, just let it freerun. If you want to know more on that, ask me, or read up on unsigned binary addition and subtraction. (page 181 for CCPs, page 189 for ECCPs)
> 2 I2C(inter integrated circuit)/SPI(serial peripheral interface) - Already implemented as a communication bus between the user and master processors. (page 207)
> 1 ADC with a 16 line multiplexer - 1 Analog to Digital converter that can read voltages, a driver is provided by IFI so you don’t have to handle the actual hardware. The processor has an internal input mux that allows the single ADC module to read any one of 16 inputs, one at a time. These are often used with a Potentiometer to read in position feedback data or other data input. (page 273)
> PORTB special features
- 4 Unique external interrupts with programmable edge trigger direction - the first four pins on port b (the last two of which (RB2 and RB3) are avalable as Digital I/O 1 and 2) which have an individual interrupt flag for each pin and can be programmed to edge trigger on a low-to-high or high-to-low transition. very useful with encoders, ultrasonic sensors, any one of a plethora of sensing situations. especially useful for pulse timing when an input capture is not available. (pages 140, 123-125)
- 4 Grouped external interrupt on change pins - the last four pins of PORTB (RB4,5,6,7 or Digital I/O 3,4,5,6) have one interrupt flag if any number of the pins have a high to low OR low to high transition… it is not programmable. also, once in the interrupt, you’ll have to figure out which pin changed programmatically since theres only one flag for all four pins if your using more than one. If you use these external interrupts, above all, remember this: if you don’t read portb, you’ll be in whats called a “Mismatch Condition” in the silicon of the chip, causing the port to continually interrupt over and over and over. To solve this, just make sure you read or write portb in your interrupt service routine. (pages 140, 123-125)
> 2 Analog Comparators - Used for seeing which of two voltages is greater without actually getting the values of them, a much faster process than full analog to digital conversion. (page 283)
> 2 8bit and 3 16bit Timers - These all have varying characteristics, but for the most part, they incorporate a prescaler which divides down off of a 10MHz clock for the rate at which the timer’s 8 or 16 bit counter increments. The 16 bit timers have the neat option of doing a 16 bit read… when one reads the low byte of the timer (TMRxL) the high byte is instantly copied, in hardware, to a register which is then read as the high byte of the timer (TMRxH). TMR3CON, the control register for timer three, has the extra responsibility for directing the data from the timers to CCP modules, the programmer can change where they go to. Remember, timer 0 is the most flexible timer available since it is the original. (pages 163-180)
> 1024bytes of EEPROM - Electrically Eraseable/Programmable Memory - A few control registers control reading and writing to this static memory which doesnt erase when the processor is shut off, good for storing data from during a match or keeping configuration values, autonomous programs, etc. Remember: this memory is slow. (page 113)
> 8x8 Hardware Multiply - This allows a byte to be multiplied by another in hardware, a function controlled by the compiler but if an extreme speed multiply is needed using this in assembly results in a single-cycle multiply. A VERY nifty feature. (page 119)
> General I/O notes - The chip has 70 I/O pins that can be configured individually as an Input (1) or Output (0) by setting their Tristate (TRISx) value. The IFI board on which the processor is installed pulls up all the Digital I/O lines so they float at about 3v, and have a normal state of 1, so watch that in your logic, remember when a signal line is connected to ground it is zero, when it isnt its one. When configured as an output, each individual pin can drive 25mA… a defining feature of microchip microprocessors.
Again, here’s the link to the user’s manual for the chip.
Well I think that about sums up what i have in my head. If you need any additional help just give me a yell on this thread or otherwise, a positive rep never hurts if you found this useful, and I’ll see you all in atlanta… just give me a yell there and ask anyone on 1024 for “Q”, they’ll point you in the right direction.