ag. How to program PIC32MX270F256B? Is it really more difficult than PIC32MX250F128B programming?

QUESTION

How to program PIC32MX270F256B? Is it really more difficult than programming PIC32MX250F128B?

ANSWER

PIC32MX270F256B is in fact the not much different than its precessor. However, it is not supported by old programming environments and old compilers, like Microchip MPLAB 8.92 and C32 compiler. It is ironic that you can use MPLAB 8.92 with XC32 compiler v1.31 or later, but you can only select PIC32MX270F128B microcontroller in MPLAB X environment. Technically, one could write a PIC32MX270F256B program in MPLAB 8.92, but the program could only be compiled with X32 compiler v1.31 or later from the command line, because it is not possible to select PIC32MX270F128B device from Configure --> Select Device window. The problem is infact in the MPLAB 8.92 device library which lacks PIC32MX270F256B configuration.

MPLAB 8.92 can only instruct XC32 compiler to set mprocessor variable to 32MX250F128B:

"C:\Program Files (x86)\Microchip\xc32\v1.33\bin\xc32-gcc.exe" -mprocessor=32MX250F128B -x c -c "main.c" -o"main.o" -MMD -MF"main.d" -I"C:\Microchip Solutions\USB\Device - HID .... "

.. but we would need the line above to like this:

"C:\Program Files (x86)\Microchip\xc32\v1.33\bin\xc32-gcc.exe" -mprocessor=32MX270F256B -x c -c "main.c" -o"main.o" -MMD -MF"main.d" -I"C:\Microchip Solutions\USB\Device - HID .... "

There should almost certainly be some workaround...

But if you decide to import your PIC32MX250F128B project into a newer MPLAB X environment, there is in fact not much to do to make the code compile and run on PIC32MX270F256B. If you use an old (USB) library stack, you just have to add PIC32MX270F256B microcontroller in header files as if there was another kind of PIC32MX250F128B. It works! And it is easy enough!

However, if you seek a ready to use solution, or if you would like to make a test circuit, you can also download PIC32MX270F256B firmware v2.9.1 from Downloads section. The programming header is the same as for PIC32MX250F128B. Programming support for Microsoft Windows is identical. The same FWI files can be used with the same version of PC USB Projects firmware. And of course, there is also a programming guide ... You can use the same tool to set an arbitrary VID and PID for USB (PIC32MX250F128B/PIC32MX270F256B Setup Utility v2.0).

What are the key benefits of PIC32MX270F256B?

- 64 kB of SRAM (staric RAM), twice as much as PIC32MX250F128B

- 256 kB of EEPROM (flash RAM), twice as much as PIC32MX250F128B

- I2S interface (advanced version of I2C) is supported (PIC32MX250F128B only supports I2C)

- PIC32MX270F256B seems to be even cheaper than PIC32MX250F128B at some web shops. I've bought 5 pieces at Farnell a few days ago and price for a single PIC32MX270F128B was 4.68 €, while a single PIC32MX250F128B would cost me over 5 €. This would not be the case at Mouser, where PIC32MX270F256B is a few cents more expensive than PIC32MX250F128B.

PIC32MX270F256B microcontroller was introduced in April 2014. Is it really so much more difficult to program? Except for larger RAM and EEPROM and few additions, it seems to be almost identical to PIC32MX250F128B.

NOTE: Printed circuit board design for PIC32MX250F128B/PIC32MX270F256B basic circuit is now available in PIC32MX250F128B - PCB - basic circuit - v1.0 - KiCAD - GERBER - 12.7.2014.zip file for KiCAD from Downloads section.

ALSO READ:

- PC USB Projects PROGRAMMING GUIDE

- PC USB Projects HEX Editor v3.0

- Microsoft Visual Basic.NET support for PIC32MX250F128B and PIC32MX270F256B

- Basic circuit for PIC32MX2xxFxxxB to work over USB with an 8.000000 MHz crystal resonator

- Velleman K8055N board to 32-bit PIC32MX250F128B/PIC32MX270F256B adapter schematic

- Velleman K8055-1 experiment board to 32-bit PIC32MX250F128B/PIC32MX270F256B adapter schematic

- WIRELESS CHAT (also works on PIC32MX270F256B)

- ICSP Programmer for PIC32 microcontroller family