the jump to avr 32 bit

Go To Last Post
7 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi everyone over here.
I am considering now that Arduino has brought out the Arduino due to look into programming32 bit avr's but I cant find a getting started anywhere. I dont mind the arduino hardware, but I dont want to use their software.
Can someone please recommend a beginners guid to migrating from 8 bit to 32 bit, perhaps a dev board, and a "hello world" for 32bit.

Really the reason I want to do this is so I can use larger colour lcds
Thanks

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm involved in the development of Aery32 that's a small dev board you were asking.

One of our users has worked with ssd1289 driven 3" 320x240 resolution LCD. See his project here https://github.com/nestori/aery3...

The asked "hello world" example is work in progress. Atm. this is a driver for RS232 so you need FTDI's USB-to-RS232 cable, for example, to communicate with PC via USB.

The native USB "hello world" using USB CDC (virtual comport) has been planned to be next on the list when this serial port class driver has been released in v0.6.0 version of the Aery32 framework.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for that, it looks like a great product, I might actually have to order one!
One question. How does using 8 bit code on a 32 bit platform work - i.e how much adjusting has to happen. For instance there is the Fatfs library for using SD cards with 8 bit processors, is it a direct port to a 32 bit device or would it need a comlete rewrite. (And would it use 32 bits, or just 8?)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

a.mlw.walker wrote:
How does using 8 bit code on a 32 bit platform work - i.e how much adjusting has to happen. For instance there is the Fatfs library for using SD cards with 8 bit processors, is it a direct port to a 32 bit device or would it need a comlete rewrite. (And would it use 32 bits, or just 8?)
AVR8 code does not work straight with AVR32. The register mapping is completely different. If that Fatfs library is general C or C++ code and has some interface between MCU registers, then it should be quite easy to port it to AVR32. But if it relies heavily on AVR8 and the logic is hard coded without any interface/api then it most likely needs complete rewrite. However, you could Google if there exists one already.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So if you want to pull a pin high on an 8 bit you might do

PORTB |= (1 << PB0);

What would the 32 bit equivelent be, just so I can tell whether porting code is possible or easier to go on the 32 bit hunt.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

PORTB |= (1 << PB0);

What would the 32 bit equivelent be, [...]


AVR32_GPIO.port[0].ovrs = (1 << AVR32_PIN_PA8);

or

gpio_set_gpio_pin(AVR32_PIN_PA8);

AVR and AVR32 are too different. Better not drag old baggage around with you.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You can also do this

#include 
#define PORTB (AVR32_GPIO.port[1].ovr)
PORTB |= (1 << PB0);

However, as catweax said better not drag old baggage around, but AVR8 kind of PORTn is possible to do this way.

I would also like to add that

gpio_set_gpio_pin(AVR32_PIN_PB0);

is from Atmel Software Framework and in Aery32 Framework (my code) the equivalent call is

gpio_set_pin_high(AVR32_PIN_PB0);