
The long awaited 32-bit ARM ECIO module is now available to buy from Matrix so this month I will write an article on moving a design from an 8-bit system to a 32-bit system using Flowcode. Like the other ECIO modules the new ARM module is capable of supplying power via the USB connection or via an external 5V supply. The module also works with our ECIO application board so E-Blocks can be quickly and easily attached to your embedded system.
The ECIO provides the user with 30 configurable I/O pins that feature functionality including I2C, PWM, UART, SPI and analogue. The 32-bit ARM ECIOs also feature 4 dedicated analogue input channels labelled as PortE. When combined with our award winning Flowcode software the possibilities are endless with native 32-bit floating point variable support and many other advanced features such as Bluetooth, Ethernet etc.
One problem with the ARM devices is that they run at a lower voltage of 3.3V rather then the normal 5V used by PIC and AVR devices. This can sometimes lead to problems so we have taken several steps to relieve this problem. Firstly we have used a 3.3V regulator onboard the ECIO ARM to allow it to be powered from the USB and the standard ECIO Applications board as well as a range of other sources. Secondly we have ensured that the I/O pins are 5V tolerant so signals designed for a PIC or AVR will not damage the device and will work as expected. Finally we have developed our E-Blocks range with this 3.3V / 5V problem in mind and any board that may have a problem with this low voltage operation comes complete with a jumper to place it into 3.3V operation.
Flowcode ARM 3.4.7 requires a small modification to allow the ECIO ARM devices to be programmed correctly. Method A is for the ECIO ARM devices and method B is for the EB031 ARM E-Blocks. Users of Flowcode running versions later then 3.4.7 will not have to apply this mod.
β€C:\Program Files\Matrix Multimedia\Flowcode_ARM\Tools\Globalβ€
A) Extract the attached file ECIOARM into the specified folder above to allow the ECIO ARM device to work with Flowcode ARM. Click Ok to overwrite any files when prompted. Also place the attached ECIOARM.FCD file into your Flowcode_ARM\FCD folder.
B) Extract the attached file EBARM into the specified folder above to allow the EB031 ARM E-Block device to work with Flowcode ARM. Click Ok to overwrite any files when prompted. Also place the attached EB031.FCD file into your Flowcode_ARM\FCD folder.
Ok so lets start looking at taking a generic Flowcode PIC program and converting to the ARM alternative. I am going to be using the PWM_LED example from our examples section as this seems to arouse a lot of interest. Flowcode programs created in the PIC or AVR versions of Flowcode can be converted to the ARM version of Flowcode by using the File -> Import menu inside Flowcode ARM.
1) Opening Flowcode ARM I come to the new or open menu. Here I simply click cancel and then use the File -> Import menu to open my Flowcode PIC LED program.
2) I am now faced with a warning stating that the imported file uses a 16F88 and I am asked to choose a target from the ARM range of processors. I choose the ECIOARM device that we added before by copying the Flowcode definition file into our FCD directory.
3) Looking through the program I can spot a small problem with the timer interrupt enable. The ARM uses slightly different names for the interrupts so I will have to assign the new interrupt name to the interrupt enable icon. This basically changes from TMR0 in Flowcode PIC to TMR0 8-BIT in Flowcode ARM. Other potential pitfalls occur when using hardware peripherals such as UART, I2C, SPI etc. Just make sure you are using the correct pins assigned to the hardware functions. A list of the pins and their respective functions is shown by clicking on the View -> Chip menu in Flowcode.
4) Save and compile your code to the ECIO device, insert your ECIO ARM into the USB and press reset. Now your old PIC or AVR code is running on the faster and more powerful 32-bit ARM device allowing you to introduce more features into your software functionality or squeeze out a little more throughput from the device.