Re: Could I target BP V3.5+ to run on the PIC24FJ128GA010
Reply #1 –
Hi,
Do you guys think porting BP V3.5+ to PIC24FJ128GA010 would require non-trivial changes or could it be as simple as changing the target processor + perhaps change the .lkr?
I have done this before for the F128GA006. You'll need to change the processor, but also we use PPS to assign the peripherals to the same pins, this will need to be updated too (see IO section of the datasheet). Everything is defined in the hardware profiles. Make a new copy and configure it for your hardware.
While I guess porting to dsPIC33FJ256GP710 would be non-trivial
If it has PPS then no problem.
My immediate needs are:
1. Native USB communication (no 3rd party drivers), preferably in HID mode that allows me to speak to the BP as a virtual serial port over USB
That will continue to be a need ;) 1. There's no totally 'driverless' USB serial, you'll at least need a .inf to point eg Windows's own internal USB->serial driver. 2. There's no USB HID serial device type. 3. Only the GB PICs have USB, the GA would need to be serial with a USB->serial converter chip.
2. Hardware PWM that allows me to set the post and prescalers in software during runtime.
The hardware PWM will be configured to trigger a high priority ISR that can toggle multiple pins according to an algorithm
This means that I would have to disable (or recode to a different timer than Timer2) any functionality in BP that depends on the hardware PWM: are there any critical functions in the BP that depend on the timer2 (say USB polling code)?
Yes, I think timer 2 is used to flush the USB CDC buffer. It could be any timer thoiugh. As far as I know, PIC24 does not limit PWM to timer2, you can use different timers and assign the PWM to a pin as needed.
3. Be able to sample some ADC pins simultaneously
Same time as PWM or multiple pins at the same time? A PIC can, as far as I remember, only sample 1 ADC at a time.