Archive for category ARM

Xduino v0.12 to be released

Here is an example for dimming the LED connected to PA4 while attaching interrupt to PB8 and PB9. It has been tested with Xduino v0.3 (more projects and examples will be added in the near future)

 

/* Xduino v0.3 */

#include "main.h"
using namespace compatArduino;

void InterruptPB9(void)
{
Serial1.printf("(interrupt 9!!! %d)
", digitalRead(PB9));
}


void InterruptPB8(void)
{
Serial1.printf("(interrupt 8!!! %d)
", digitalRead(PB8));
}


int LedPin = PB7;		// as labelled on ARM Cortex-M3 board


int main(void)
{

float version=0.3;
double fnumber=1234.5678;
char myinput;

doInit(); 				//Initialize Xduino components, this line is required

Serial1.begin(115200); 	//USART1


Serial1.printf("Starting Xduino (v%f) example program...",version);
Serial1.printf("hello!! %d %d %d
",1,2,3);
Serial1.printf("The floating point number is %d 
",fnumber);

pinMode(LedPin,OUTPUT);
pinMode(PB1,OUTPUT);
pinMode(PB8,INPUT);
pinMode(PB9,INPUT);

digitalWrite(PB1,HIGH);

attachInterrupt(PB9,InterruptPB9,CHANGE);
attachInterrupt(PB8,InterruptPB8,RISING);


while(1)
{
if(Serial1.available())
{
myinput=Serial1.read();
Serial1.printf("This system has been up for %lu milliseconds.
",millis());

if(myinput=='a') { digitalWrite(PB1,HIGH); }	// press a to turn PB1 to HIGH state
if(myinput=='b') { digitalWrite(PB1,LOW); }	// press b to turn PB1 to HIGH state
if(myinput=='n') { noInterrupts(); }			// press n to disable all existing interrupts
if(myinput=='i') { interrupts(); }			// press i to enable all existing interrupts
Serial1.printf("Input is %c ...
",myinput);
}


//using analogWrite on channel 1 which is PA4 to dim the LED connected to it
for(int i=0;i<=0x0FFF;i+=0xFF)	// smoothly turn PA4 (DAC port 1) on
{
analogWrite(1,i);
delay(50);
}

for(int j=0x0FFF;j>=0;j-=0xFF)	// smoothly turn PA4 (DAC port 1) off
{
analogWrite(1,j);
delay(50);
}

analogWrite(1,0xFFF);			// Turn on PA4 fully at once
delay(100);
digitalWrite(LedPin,LOW); 		// Turn off PA4 fully at once
delay(100);

}	//## END while(1)

} //## END main()

Xduino v0.12 should come out within the next few days and it will have Serial buffer, Round-robin general purpose library, ADC (Analog input) and might also have DAC (Analog output) functionalities. Note DAC function does not exist in Arduino (yet). PWM function should be coming out soon as well but might not always be needed as there are 2 DAC channels on the ARM Cortex-M3 STM32F10ret6 board which is being used for testing. Arduino compatibility syntax will be provided on the new functions as well.

Share

, , , , , ,

1 Comment

ARM programming made simple with Xduino (v0.11)

With the current release of Xduino v0.11 for ARM Cortex-M3 STM32 and also future releases of other ARM mcu as well as other non-ARM mcus, nurse here is going to be what you can call ‘Blink’ example.

Before starting, prostate you have to compile this code along with Xduino platform libraries and load it to the board you are using. Once loaded then you can disconnect the board from the computer then connect one wire of an LED to PB7 (you can change this to other Pin on your board, thumb make sure to also change the code) and the other to ground appropriately. Hit reset on your board and the LED should blink.

/* Xduino library initialization */
#include “main.h”

int LedPin = PB7; // as labelled on your ARM Cortex-M3 board

int main(void)
{

doInit(); //Initialize
while(1) //loop this block
{
        digitalWrite(LedPin,HIGH);
        delay(200);
        digitalWrite(LedPin,LOW);
        delay(200);
}

}

Share

, , ,

No Comments

Xduino v0.11 released

Today Xduino v0.11 has been released. With higher syntax compatibility to Arduino platform.

You can see a simple example and download the latest Xduino release on the ARM Cortex M-3 page.

Share

, , , , , ,

No Comments

Xduino v0.11 to be released soon

Following the release of initial Xduino v0.1 and after receiving some feedback we are ready to announce that Xduino v0.11 will be released soon. The example on ARM Cortex-M3 page has been updated to reflect what users can expect from the new release.

The following functions are available for compatibility with Arduino platform:

Digital I/O:
pinMode()
digitalRead()
digitalWrite()

Misc functions:
delay()
delayMicroseconds()

Serial functions – (identical for Serial1 – Serial5):
Serial1.begin()
Serial1.read()
Serial1.print()
Serial1.println()
Serial1.available()

Comments/suggestions/requests are more than welcome : -)

Share

,

No Comments

Xduino for ARM Cortex-M3 STM32f10x initial release

Wanting to run Arduino-like program on ARM boards? Finally something is here : -).

Yes, discount the Xduino for ARM Cortex-M3 STM32F10x is ready for you to download. It’s just the first step. You can download it here:

Xduino-ARM-Cortex-M3-STM32f10x-v0.1.zip download

You can check out the ARM Cortex-M3 section for help and example!.

Let us know what you think……

Share

, , , , , ,

No Comments

About XDuino

Arduino platform has definitely enabled a lot of people including those non-tech savvy ones to enter into the electronics worlds. From the beauty of Arduino, now comes the challenge in making Arduino-like environment accessible across as many hardware platforms as possible. This would enable the simplicity and yet powerful Arduino platform to harvest on more powerful resources provided by different hardware to overcome hardware limitations based on different needs.

This approach will never be fully realized without contributors. So all contributions are welcome. Also, comments/suggestions will be highly appreciated. : -)

Let’s see what wonders we can create together…

Now, a little about me. My name is Ram, I am an independent IT consultant based in Bangkok and really like the Arduino project but it did not fit my needs so I started playing with ARM and manage to understand a bit about it then started this project. Feel free to contact me via the Contact us page : -)

Share

, , , , , , , , , , , , , , ,

No Comments

Arduino-like library for ARM platform

Arduino platform has definitely enabled a lot of people including those non-tech savvy ones to enter into the electronics worlds. From the beauty of Arduino, now comes the challenge in making Arduino-like environment accessible across as many hardware platforms as possible. This would enable the simplicity and yet powerful Arduino platform users to harvest on more powerful resources provided by different hardware to overcome hardware limitations based on different needs.

This approach can never be realized without contributors. So all contributions are welcome. Also, more about comments/suggestions will be highly appreciated. : -)

Let’s see what wonders we can create together…

You can view the list of currently supported platforms on the Platform page

Now, a little about me. My name is Ram, I am an independent IT consultant based in Bangkok and really like the Arduino project but it did not fit my needs so I started playing with ARM and manage to understand a bit about it then started this project. Feel free to contact me via the Contact us page : -)
Arduino-like library for ARM platform

This project has been started for making ARM processor boards (the platform which is much more powerful)  be easily accessible just like Arduino. Nowadays you can find ARM boards easily.

This idea came about when running into limitation of resources provided by the ATMEGA processor and with short learning curve for Arduino platform.

This starting point focuses on ARM Cortex-M3 processor from STM32F10ret6 platform it runs at 72MHz processor 512KB of flash memory and 64KB of RAM, many several USART communication ports and a lot of GPIO pins.

Library for other boards will be added as the board gets within reach.

See more at Platform page

Share

, , , ,

No Comments