Page 1 of 1
choice of pic
Posted: Fri Feb 19, 2010 12:20 pm
by frankmortensen
How can I know which pic I can use with various components of the flow code, I will use the component servo and I know that it works with a pic16f877 but not with a 16f88.
how can I tell which features a pic to be had (timer PWM, etc.) to work with a component
Re: choice of pic
Posted: Fri Feb 19, 2010 4:02 pm
by Benj
Hello
Ok here is a list of hardware peripherals used by the components. Please note that this is PIC based only.
Servo - Timer2 + 2 CCP modules
PWM - Timer1
Webserver / TCP - I2C master
ADC - ADC hardware
SPI_Legacy / CAN / CAN2 - SPI
IrDA / RFID / Bluetooth / Zigbee / GPS - UART
USB components - USB hardware
EEPROM - EEPROM hardware
The other components are generally bit banged or provide a hardware option eg RS232, FAT and I2C.
RS232 - UART
FAT - SPI
I2C - I2C Master
The only other restriction is the Speech component which will only compile on an 18F device.
Re: choice of pic
Posted: Mon Apr 12, 2010 9:13 pm
by rene
Hello,
I'm only a beginner with PICmicro.
My english is not very well, but If I understand correctly.
Should it succeed with a 16F628 to a servo to drive?
Because it has 3 timers.
Yet am I unable to use a servo with a 628
Why?
Where am I wrong?
Rene
Re: choice of pic
Posted: Mon Apr 12, 2010 10:01 pm
by Sean
Hello Rene,
The servo component requires a 16-bit timer (TMR1) with two CCP (capture compare pwm) modules attached. The code uses the two CCP modules in 'compare' mode to generate two interrupts.
One CCP module generates an interrupt every 2.5ms to trigger the start of each channel pulse ( 8 channels * 2.5ms = 20ms cycle time). Unused channels still have a 2.5ms time slot allocated to maintain the 20ms cycle time.
The other CCP module is supplied with the pulse width value for each channel in sequence.
Devices like the F88, F628 etc, have a 16-bit timer, but only have one CCP module (one PWM channel) and can not generate all the required timing signals.
The F877 contains the two CCP modules required, as do many newer devices.