Skip to main content
Topic: Could I target BP V3.5+ to run on the PIC24FJ128GA010 (Read 1498 times) previous topic - next topic

Could I target BP V3.5+ to run on the PIC24FJ128GA010

Just bought the 'Explorer 16 Development Board' http://http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en024858

Comes with one each of the PIC24FJ128GA010 and the dsPIC33FJ256GP710 DSP.

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?

Or would the porting complexity be somewhere in between?

While I guess porting to dsPIC33FJ256GP710 would be non-trivial, but I am excited about running the BP on the PIC24FJ128GA010 and was wondering if any of you have experimented with something similar before?

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

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)?

3. Be able to sample some ADC pins simultaneously

Please advice as I have no knowledge of the PIC24F hardware at the moment and would like to know how much work this porting could involve :-)
Looking forward to meeting other hobbyists. PM me if you are in or around Orange, CA!

Re: Could I target BP V3.5+ to run on the PIC24FJ128GA010

Reply #1
Hi,
Quote
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.

Quote
While I guess porting to dsPIC33FJ256GP710 would be non-trivial
If it has PPS then no problem.

Quote
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.

Quote
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.
Quote
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.
Got a question? Please ask in the forum for the fastest answers.