mkarlsson Posted March 26, 2013 Report Share Posted March 26, 2013 I have been working on porting the Arduino 1.5.2 code base to Pipistrello using the Microblaze soft processor running at 100 MHz. This is definitely a work-in-process but I think it's complete enough to share. The biggest downside of using the Microblaze core in this project is that it requires an EDK license which is not free. It's possible to swich to Microblaze_mcs which is part of the free ISE Webpack but it would restrict the processor to 64 KB address space and use the lower-performance 3-stage processor vs. the high-performance 5-stage Microblaze in EDK so at this point I'm sticking with the full Microblaze core since it will also allow full access the the Pipistrello 64 MB DRAM space. The full arduino-1.5.2-windows version of this can be downloaded here:http://www.saanlima.com/download/arduino-1.5.2-windows.zip The Linux version is almost there, just fighting silly FTDi serial port issues (man, I love Linux but why does it have to be so difficult to do simple things like user-space serial port access) What works and what's not there yet? I think it's easier to answer what's not there instead of what's there. The following things are not impemented: analogRead(), analogReference(), analogReadResolution() : No analog input on Pipistrello tone(), noTone(): the hardware for this is not yet there attachInterrupt(), detachInterupt(), interrupts(), noInterrupts(): the interrupt system is not yet impemented hardware for I2C is not yet implementedSPI hardware is master-mode only OK, so what does work? The following Arduino functions are implemented:pinMode()digitalRead()digitalWrite()analogWrite()AnalogWriteResolution()millis()micros()delay()delayMicroseconds()pulseIn() (not yet calibrated though)shiftIn()shiftOut()Serial()Serial1,2,3() Pins:Wing A pins 0 - 15 has arduino pins 0 - 15. They can all do digital in/out and analog out. Analog out has 16 bit resolution but is scaled down to 10 bits for compatibility with the Atmega parts. However, the new function analogWriteResolution() introduced in arduino-1.5 for Due allows you to change the resolution to 16 bit.Wing B pins 0 - 7 has arduino pins 16 - 23. They are digital only or SPI ports (if enabled).The LEDs on the board are mapped to pins 12,13,14 and 15 but can be remapped to any of pins 0 - 15 by writing to a register (the arduino code for this is not there yet).Just like for Mega there are 4 serial ports - Serial, Serial1, Serial2 and Serial3. Serial is connected to the FTDI chip and Serial1 - 3 are connected to Wing B pins (8,9), (10,11) and (12,13).There are 3 SPI ports in hardware - the default is connected to the SD card socket and is using arduino pin 53 as chip select. The 2 extra SPI ports are not yet exposed in the Arduino code. The library SPI is working as well as the SD library that uses the SPI library Things to try:Examples -> 01.Basic -> Blink (should run without any changes and blink the red LED L2)Examples -> 03.Analog -> Fading (change the LED pin from 9 one of pins 12 - 15)Examples -> SD -> CardInfo (needs a microSD card, change chipSelect from pin 4 to pin 53 and enable a serial console)Magnus Link to comment Share on other sites More sharing options...
This topic is now archived and is closed to further replies.