Forum Menu




 


Log in Problems?
New User? Sign Up!
AVR Freaks Forum Index

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
angelu
PostPosted: Jan 12, 2012 - 04:40 AM
Resident


Joined: May 28, 2006
Posts: 718
Location: Toronto, Canada

Hello everyone,
I am starting to sell my XME dev board and I want to start with 10 pcs for free.
If you have more than 1000 posts on this forum and want one, send me a PM.

The board can be seen here http://www.avrfreaks.net/index.php?name ... start=1020

and here http://www.youtube.com/watch?v=FgVPLzlw ... e=youtu.be

George.

edit: if you have more than 100 posts here and want to play with Xmega, feel free and send me a PM.

_________________
www.sofgel.ro bootloader for mega and xmega
www.elsofgel.com XME development board


Last edited by angelu on Jan 28, 2012 - 01:12 AM; edited 4 times in total
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
js
PostPosted: Jan 12, 2012 - 05:04 AM
10k+ Postman


Joined: Mar 28, 2001
Posts: 20637
Location: Sydney, Australia (Gum trees, Koalas and Kangaroos, No Edelweiss)

Unfortunately it doesn't seem to bring out enough I\O pins ( I need at least 20, 2 of which ADC) otherwise I would have been in. Smile

_________________
John Samperi
Ampertronics Pty. Ltd.
www.ampertronics.com.au
* Electronic Design * Custom Products * Contract Assembly
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
schtevo
PostPosted: Jan 12, 2012 - 06:06 AM
Hangaround


Joined: Nov 19, 2001
Posts: 265
Location: Melbourne, Australia

I'm all for free dev boards.
Hazzarh!
Most generous George.
 
 View user's profile Send private message  
Reply with quote Back to top
Plons
PostPosted: Jan 12, 2012 - 11:58 AM
Raving lunatic


Joined: Nov 01, 2005
Posts: 6356
Location: Hilversum - the Netherlands

I haven't worked yet with Xmega's so count me in (will send you a PM)
What will the sellingprice be ?

Nard

_________________
Dragon broken ? Or problems with the Parallel Port Programmer ? Scroll down on my projects-page http://www.aplomb.nl/TechStuff/TechStuff.html for tips
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
leon_heller
PostPosted: Jan 12, 2012 - 12:02 PM
Raving lunatic


Joined: Jul 27, 2001
Posts: 7429
Location: St. Leonards-on-Sea (UK)

I'll give it a go, as well. I've never used an Xmega, although I have a couple of chips somewhere.

_________________
Leon Heller
G1HSM
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
alank2
PostPosted: Jan 12, 2012 - 04:12 PM
Posting Freak


Joined: Jul 16, 2009
Posts: 1587


Awesome! I've been wanting to play around with an xmega. PM incoming!!
 
 View user's profile Send private message  
Reply with quote Back to top
Bingo600
PostPosted: Jan 12, 2012 - 04:28 PM
Raving lunatic


Joined: Apr 25, 2004
Posts: 3817
Location: Denmark

Nice looking board , would love to try one.

PM incomming

/Bingo
 
 View user's profile Send private message  
Reply with quote Back to top
DocJC
PostPosted: Jan 13, 2012 - 12:12 AM
Raving lunatic


Joined: Dec 11, 2007
Posts: 6982
Location: Cleveland, OH

George already got my PM!

Very generous!

Thank you, George.

JC
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
leon_heller
PostPosted: Jan 14, 2012 - 01:04 AM
Raving lunatic


Joined: Jul 27, 2001
Posts: 7429
Location: St. Leonards-on-Sea (UK)

I just got a PM from George saying that he'd shipped my board.

_________________
Leon Heller
G1HSM
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
Plons
PostPosted: Jan 14, 2012 - 01:07 AM
Raving lunatic


Joined: Nov 01, 2005
Posts: 6356
Location: Hilversum - the Netherlands

leon_heller wrote:
I just got a PM from George saying that he'd shipped my board.
Ditto Smile
Shouldn't we be asleep ?

Thanks George !

_________________
Dragon broken ? Or problems with the Parallel Port Programmer ? Scroll down on my projects-page http://www.aplomb.nl/TechStuff/TechStuff.html for tips
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
leon_heller
PostPosted: Jan 14, 2012 - 01:25 AM
Raving lunatic


Joined: Jul 27, 2001
Posts: 7429
Location: St. Leonards-on-Sea (UK)

I suffer from insomnia. Sad

_________________
Leon Heller
G1HSM
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
angelu
PostPosted: Jan 14, 2012 - 01:36 AM
Resident


Joined: May 28, 2006
Posts: 718
Location: Toronto, Canada

Quote:
Unfortunately it doesn't seem to bring out enough I\O pins ( I need at least 20, 2 of which ADC) otherwise I would have been in. Smile

The idea was to be a board for students and software guys, so in order to work with it you no need anything, not even an USB cable. And then you can work at school and continue home where maybe you share a room with someone and do not want to mess with wires, DMM, power supply. Peripherals connected through UART, I2C and SPI are already there.
But you still have access to PortC and other few lines through the connector.
Quote:
What will the sellingprice be ?

I am thinking at 34USD.

2mm pitch sounds a little strange, but I wanted to expose as many pins as possible. PC6 and PC7 are reversed in order to be able to directly connect a Maxstream radio module, only one row, not very professional, but you still can.

For the LCD driver, I found a PIC to be the best option.

And finally, I was looking for other micros, at Microchip for example to have a board based on a PIC (8 bit) also, but there is no such micro to compare with Xmega. Bravo Atmel!

George.

_________________
www.sofgel.ro bootloader for mega and xmega
www.elsofgel.com XME development board
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
tpappano
PostPosted: Jan 14, 2012 - 05:25 AM
Raving lunatic


Joined: Dec 01, 2003
Posts: 2507


Cool, I'll try one if you have one left!

Thanks for the generous offer!

_________________
Tom Pappano
Tulsa, Oklahoma
 
 View user's profile Send private message  
Reply with quote Back to top
leon_heller
PostPosted: Jan 20, 2012 - 12:24 PM
Raving lunatic


Joined: Jul 27, 2001
Posts: 7429
Location: St. Leonards-on-Sea (UK)

My board just arrived - very neat!

I need some docs, though.

_________________
Leon Heller
G1HSM
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
Plons
PostPosted: Jan 20, 2012 - 01:43 PM
Raving lunatic


Joined: Nov 01, 2005
Posts: 6356
Location: Hilversum - the Netherlands

leon_heller wrote:
My board just arrived - very neat!

I need some docs, though.

This as a starter ? http://www.sofgel.ro/vechi/language/en/ ... onics.html

I received the board as well. Thanks.

_________________
Dragon broken ? Or problems with the Parallel Port Programmer ? Scroll down on my projects-page http://www.aplomb.nl/TechStuff/TechStuff.html for tips
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
leon_heller
PostPosted: Jan 20, 2012 - 01:47 PM
Raving lunatic


Joined: Jul 27, 2001
Posts: 7429
Location: St. Leonards-on-Sea (UK)

Thanks. I was looking for it on the home page and Projects.

I can't get the boot loader to work. I tried EasyBootXAVR 1.4WIN (124.zip) and it tries to communicate on COM2. The Silicon Labs CP210x USB to UART Bridge is on COM38 on my system. I think that the supplied file, EasyBootAVR_1_4.exe, is the wrong one.

The software source code should be supplied.

_________________
Leon Heller
G1HSM
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
angelu
PostPosted: Jan 20, 2012 - 04:39 PM
Resident


Joined: May 28, 2006
Posts: 718
Location: Toronto, Canada

There is an .INI file on the same directory. Open it and change the com port from COM2 to COM38 or whatever port is assigned. Then try again.

I know there is an API function that could give me the available ports but I do not know which one is. If somebody could tell me about, I could put a drop down list to choose from.

I am cleaning up the project for the demo firmware on AS4 and I will post it.

George.

_________________
www.sofgel.ro bootloader for mega and xmega
www.elsofgel.com XME development board
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
leon_heller
PostPosted: Jan 20, 2012 - 06:23 PM
Raving lunatic


Joined: Jul 27, 2001
Posts: 7429
Location: St. Leonards-on-Sea (UK)

Thanks, George.

Editing the .INI file fixed the problem.

_________________
Leon Heller
G1HSM
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
ninevoltz9
PostPosted: Jan 20, 2012 - 07:57 PM
Resident


Joined: Feb 28, 2004
Posts: 976
Location: Ohio

I wish someone would make a board similar to the raspberry pi or beagleboard, except using the AVR32 AP7000 as the CPU. I would buy one of those for sure.

I would, but I'm too lazy.

_________________
I like cats, too. Let's exchange recipes.
 
 View user's profile Send private message  
Reply with quote Back to top
clawson
PostPosted: Jan 20, 2012 - 08:57 PM
10k+ Postman


Joined: Jul 18, 2005
Posts: 62952
Location: (using avr-gcc in) Finchingfield, Essex, England

Quote:

except using the AVR32 AP7000 as the CPU.

Atmel stopped production of AP7000 ages ago and they are now "not recommended for new design". It was their attempt at a mobile phone CPU that failed (I guess a large customer pulled out or something) so in AV32 all that's left are UC3's which are souped up microcontrollers rather than SoCs

_________________
 
 View user's profile Send private message  
Reply with quote Back to top
DocJC
PostPosted: Jan 21, 2012 - 05:34 AM
Raving lunatic


Joined: Dec 11, 2007
Posts: 6982
Location: Cleveland, OH

George,

Mine arrived today!

It looks very nice and I am looking forward to working it!

Thank you!

JC
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
angelu
PostPosted: Jan 21, 2012 - 06:30 AM
Resident


Joined: May 28, 2006
Posts: 718
Location: Toronto, Canada

The demo project the board is programmed is here http://www.sofgel.ro/vechi/language/en/ ... onics.html (asm).
George.

_________________
www.sofgel.ro bootloader for mega and xmega
www.elsofgel.com XME development board
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
Plons
PostPosted: Jan 21, 2012 - 03:19 PM
Raving lunatic


Joined: Nov 01, 2005
Posts: 6356
Location: Hilversum - the Netherlands

Drivers for OS and more: http://www.silabs.com/products/interfac ... ridge.aspx

_________________
Dragon broken ? Or problems with the Parallel Port Programmer ? Scroll down on my projects-page http://www.aplomb.nl/TechStuff/TechStuff.html for tips
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
Plons
PostPosted: Jan 21, 2012 - 04:23 PM
Raving lunatic


Joined: Nov 01, 2005
Posts: 6356
Location: Hilversum - the Netherlands

How do I get the XME-board in bootloader-mode ?

(EasyBootAVR_1_4 for WinXP installed, edited EasyBootAVR_1_4.ini for use with Com32: CP2104 enumerated on 32)

_________________
Dragon broken ? Or problems with the Parallel Port Programmer ? Scroll down on my projects-page http://www.aplomb.nl/TechStuff/TechStuff.html for tips
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
angelu
PostPosted: Jan 21, 2012 - 05:00 PM
Resident


Joined: May 28, 2006
Posts: 718
Location: Toronto, Canada

There are two ways to enter the bootloader.
If the application support a jump to the bootloader section, (demo application does) then make sure the PC GUI on tab "Update Device", the text box called "Jump to BL string" is filled with 0500013977B6 (see the attached picture, red mark). This string is application firmware dependent. One could decide upon single byte (I do not recommend), but the idea is whatever your application needs to make a jump to the bootloader section put it there in that text box. It is simply sent to the serial link before to try to read fuses. Also, the BL GUI must be set properly, see the picture, blue mark. The tab Generate Bootloader does not matter here, it is used only to generate the bootloader hex file.
At the micro side this is what happen:
Code:
PCExeCom1: ; jump to boot loader
 LDI rXL, LOW(dStartBufferRxPC + 3)
 LDI rXH, HIGH(dStartBufferRxPC + 3)

 LD rA, X+
 CPI rA, 57 ; 0x39
 BRNE PCExeCom1RET
                   
 LD rA, X+
 CPI rA, 119 ; 0x77 these 0x39 and 0x77 are there only to make it less susceptible to false incoming data
 BRNE PCExeCom1RET

 LDI rZL, LOW(BootLoaderSection)
 LDI rZH, HIGH(BootLoaderSection)
 IJMP ; jump to boot loader section (32768 / 2)
PCExeCom1RET:
 RET
;********************

The second way to enter the BL is to simply click the Start button and then to give the micro a reset by using the attached small board with a reset button on it.
I may publish the serial protocol for the bootloader..
George.

_________________
www.sofgel.ro bootloader for mega and xmega
www.elsofgel.com XME development board
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
Plons
PostPosted: Jan 21, 2012 - 05:17 PM
Raving lunatic


Joined: Nov 01, 2005
Posts: 6356
Location: Hilversum - the Netherlands

Thank you !
Will try later ..... dinnertime here and I am the cook Wink


Quote:
"Jump to BL string" is filled with 0500013977B6

Aha, that is the clue.

Had already the STK600 connected with PDI; it communicates, so that's something.

_________________
Dragon broken ? Or problems with the Parallel Port Programmer ? Scroll down on my projects-page http://www.aplomb.nl/TechStuff/TechStuff.html for tips
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
angelu
PostPosted: Jan 21, 2012 - 08:39 PM
Resident


Joined: May 28, 2006
Posts: 718
Location: Toronto, Canada

The mini-add board is not on that schematic, it is a separate board.
The ISP - PDI pin and signals matches Atmel's PDI connections used on their programmers. It is a mistake it is labeled ISP. It should be PDI.
The signals are:
1 - PDI
2 - 3.3V
3 - NC
4 - NC
5 - nReset
6 - GND
George.

_________________
www.sofgel.ro bootloader for mega and xmega
www.elsofgel.com XME development board
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
Plons
PostPosted: Jan 21, 2012 - 10:25 PM
Raving lunatic


Joined: Nov 01, 2005
Posts: 6356
Location: Hilversum - the Netherlands

I'm puzzled.
I wrote a Bascom demo (hex-file) via the bootloader to XME, just to get something else in than your demo. The reason for doing that is that I want to familiarize myself with the bootloader concept. Never used one before.

After that I re-programmed the XME with the hex-file in the demo SW. I get a blinking led, but the display shows 8.E8. Vivaldi is still there.

I think I am missing some crucial information.
Openened the project in AS4, re-compiled and tried that: no luck. Same behaviour.

_________________
Dragon broken ? Or problems with the Parallel Port Programmer ? Scroll down on my projects-page http://www.aplomb.nl/TechStuff/TechStuff.html for tips
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
angelu
PostPosted: Jan 21, 2012 - 11:37 PM
Resident


Joined: May 28, 2006
Posts: 718
Location: Toronto, Canada

It seems I messed up the project when I cleaned up the comments.
Attached is a working hex file. You can use it until I fix the project.
George.

_________________
www.sofgel.ro bootloader for mega and xmega
www.elsofgel.com XME development board
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
angelu
PostPosted: Jan 22, 2012 - 03:30 AM
Resident


Joined: May 28, 2006
Posts: 718
Location: Toronto, Canada

Demo project fixed.
George.

_________________
www.sofgel.ro bootloader for mega and xmega
www.elsofgel.com XME development board
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
DocJC
PostPosted: Jan 22, 2012 - 07:33 AM
Raving lunatic


Joined: Dec 11, 2007
Posts: 6982
Location: Cleveland, OH

Hi George,

My XME arrived and looks great!

I have an ISR flashing the LED, (Heart Beat).
I can read the PB Switch.

Tomorrow I'll beep the Piezo and write to the LCD.

JC
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
Plons
PostPosted: Jan 22, 2012 - 01:09 PM
Raving lunatic


Joined: Nov 01, 2005
Posts: 6356
Location: Hilversum - the Netherlands

angelu wrote:
Demo project fixed.
George.

Thanks a lot, now it works fine.
I will write my own, very first Xmega program and upload that with the bootloader.

Edit: first I will try to upload one of Bascom's demo:
Code:
'-----------------------------------------------------------
'                    XM32A4-UART.BAS
'               (c) 1995-2011 MCS Electronics
' sample provided by MAK3
'-----------------------------------------------------------
$regfile = "xm32a4def.dat"
$crystal = 32000000                                         '32MHz
$hwstack = 64
$swstack = 40
$framesize = 40

'include the following lib and code, the routines will be replaced since they are a workaround
$lib "xmega.lib" : $external _xmegafix_clear : $external _xmegafix_rol_r1014

Config Osc = Disabled , 32mhzosc = Enabled                  '32MHz

'configure the systemclock
Config Sysclock = 32mhz , Prescalea = 1 , Prescalebc = 1_1

Dim B As Byte
Dim S As String * 50

Config Com1 = 38400 , Mode = Asynchroneous , Parity = None , Stopbits = 1 , Databits = 8
Config Com2 = 19200 , Mode = Asynchroneous , Parity = None , Stopbits = 1 , Databits = 8
Config Com3 = 9600 , Mode = Asynchroneous , Parity = None , Stopbits = 1 , Databits = 8
Config Com4 = 38400 , Mode = Asynchroneous , Parity = None , Stopbits = 1 , Databits = 8
Config Com5 = 38400 , Mode = Asynchroneous , Parity = None , Stopbits = 1 , Databits = 8
Open "COM1:" For Binary As #1                               'COM1....COM8

Print #1 , "This use COM1"


'Dynamic COM Port Variable must start with BUART
Dim Buart_channel As Byte                                   '0 = COM1 ...... 7 = COM8
'when using a variable, notice that the index is 0 based !


'We use here ATXMEGA32A4 so we have 5 COM Ports available (Buart_channel = 0.....4) !

Buart_channel = 0
Print #buart_channel , "This use ALSO COM1"

Buart_channel = 1
Print #buart_channel , "This use COM2"                      'You do not need to open it with Dynamic Channels

'But when you want to open it then do it this way
Open "COM3:" For Binary As #buart_channel

Buart_channel = 2
S = Waitkey(#buart_channel)                                 'waits for key on COM3

Print #buart_channel , "This is COM3)"


For Buart_channel = 0 To 4                                  'ATXMEGA32A4 have 5 COM Ports
 Print #buart_channel , "Hello"                             'print Hello on every COM Port (with configured Baud rate)
Next

'Buart_channel = 7
'Print #buart_channel , "This use COM8"             'For example for ATXMEGA128A1 devices you have 8 COM Ports

Do
  For Buart_channel = 0 To 4                                'ATXMEGA32A4 have 5 COM Ports
     B = Inkey(#buart_channel)                              'Listen on every COM Port if something is coming
  Next
Loop Until B <> 0                                           'Exit Do Loop when something is there


End


Hmm. XME1.1 still active.
BL IDE shows that fuses are read and flash is being programmed.

Do I have to do something with the BL string 0500013977B6 in my application ?

_________________
Dragon broken ? Or problems with the Parallel Port Programmer ? Scroll down on my projects-page http://www.aplomb.nl/TechStuff/TechStuff.html for tips
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
Plons
PostPosted: Jan 22, 2012 - 01:52 PM
Raving lunatic


Joined: Nov 01, 2005
Posts: 6356
Location: Hilversum - the Netherlands

My evaluation:

1. The board itself: nice design, well built. You motivated already the 2mm header.
For a developmentboard I'd like to have access to all pins: f.i. the CP2104 has lots of other pins that can be used (or abused) for different purposes.
2. You're going to sell these XME-boards as developmentboards: are they part of a training you will give ? If not, and these boards are sold as such, a good set of documentation is needed. More examples of SW implementations f.i. The demo shows what the board can do. But a set of simple example that show particular functions will give students more insight.
3. Schematic: pin numbers and devicenames are very, very small.
4. Bootloader is great: students don't need a STK600 or so with PDI functionality.
Since I never used it before: I would have liked some step by step procedure in which is expained what happens where and when. And for the complete noobs: what IS a bootloader ?

5. Price of $34: is a good price. I would be willing to pay that amount for this board.




I will keep editing this post: that prevents scattering all over the thread. Order of notes is random. I simply will add a new one or edit an existing note.

_________________
Dragon broken ? Or problems with the Parallel Port Programmer ? Scroll down on my projects-page http://www.aplomb.nl/TechStuff/TechStuff.html for tips
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
angelu
PostPosted: Jan 22, 2012 - 02:26 PM
Resident


Joined: May 28, 2006
Posts: 718
Location: Toronto, Canada

Quote:
Do I have to do something with the BL string 0500013977B6 in my application ?

The demo has an option to jump to the bootloader when it receives this string from the CP2104.
If your application has this feature and it uses any other string, then put it there in that BL IDE text box.
If it does not, then clear the text box and use the reset button to reset the micro right after you click Start button on BL IDE.
To unplug and plug again the board to USB does not work because it will take some time for the COM port to appear in Windows, and the bootloader will wait only one second for the reading fuses command to arrive, after that will give it a software reset and the application program will start.
Quote:
the CP2104 has lots of other pins that can be used (or abused) for different purposes

RTS and CTS are connected to the micro.
Quote:
Hmm. XME1.1 still active.
BL IDE shows that fuses are read and flash is being programmed.

After BL IDE starts, it will read the .hex file after first time Start button is clicked. Even you select a new .HEX file, will not be read, unless you start the application again. So likely the same demo .hex was burned again in the micro. Have to be fixed.
George.

_________________
www.sofgel.ro bootloader for mega and xmega
www.elsofgel.com XME development board
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
Plons
PostPosted: Jan 22, 2012 - 04:52 PM
Raving lunatic


Joined: Nov 01, 2005
Posts: 6356
Location: Hilversum - the Netherlands

Yup, that closing of BL IDE and opening again to get a new hex-file loaded has to be fixed. Did you write it yourself ? If so, a progress-bar during programming would be nice. And does it actually verify the uploaded code ? All I see is the sequence "Read fuses" and "Write flash memory" and "Done" in the lower left corner of the BL IDE.

MyBlinky works ...
Code:
$regfile = "xm32a4def.dat"
$crystal = 32000000                                         '32MHz
$hwstack = 64
$swstack = 40
$framesize = 40

'include the following lib and code, the routines will be replaced since they are a workaround
$lib "xmega.lib" : $external _xmegafix_clear : $external _xmegafix_rol_r1014

Config Osc = Disabled , 32mhzosc = Enabled                  '32MHz

'configure the systemclock
Config Sysclock = 32mhz , Prescalea = 1 , Prescalebc = 1_1

Set Ddrb.1

Do

   Set Portb.1
   Waitms 100
   Reset Portb.1
   Waitms 100

Loop

End

Hmm, this didn't work:
Code:
Do

   Set Pinb.1
   Waitms 100

Loop

Apparently Xmega's doesn't toggle PortB.1 when PinB.1 is written. Time to consult the datasheet. Smile


Edit: Xmega's are very sophisticated. I like that Smile
This works fine
Code:
Do
   Toggle Portb.1
   Waitms 50
Loop

_________________
Dragon broken ? Or problems with the Parallel Port Programmer ? Scroll down on my projects-page http://www.aplomb.nl/TechStuff/TechStuff.html for tips
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
DocJC
PostPosted: Jan 22, 2012 - 05:54 PM
Raving lunatic


Joined: Dec 11, 2007
Posts: 6982
Location: Cleveland, OH

I'll add to Nard's Platform Demo.

This one includes hardware definitions for all of the Xmega's Ports.Pins, but they haven't yet all been tweaked.
Some will need further refinement as one sets up the attached hardware, but this should keep one from having any significant hardware conflicts.

It triple beeps the Piezo on start up, and then uses
Port D, Timer/Counter #0, to generate a 1 / mSec Interrupt
from which a Heart Beat LED is flashed.

JC
Code:

'File:  XME Test V3.bas
'Testing George's (AVRFreak: angelu) new Xmega platform.
'ATXmega32A4, 3 char USART connected LCD, Piezo, LED, 3-Axis Accel,
'Atmel Dataflash chip, Audio amp, Relay driver,
'USB interface via USART to USB Bridge chip.
'
'Bascom.  JEC
'Jan. 21, 2012
'

'Ver: 1  Jan 21, 2012
'Simple Flash the LED at 1 Hz works.
'This runs on Xmega's Int 32 MHz Clock, at 32 MHz.
'This sets up lots of Port.Pin assignments, but have not tested them, yet.

'Ver: 2  Jan 21, 2012
'Test reading the PCB's PB Switch.  No Debounce provided.
'Push the PB Switch to turn On the LED.
'Release and LED is Off.

'Ver: 3  Jan 22, 2012
'Add a Timer/Counter ISR for driving the LED as a Heart Beat LED.
'Assume Clock is 32 MHz.
'Set Up ISR for 1 Intr / mSec,  (1 kHz Intr).
'Use Port D Timer/Counter #0.
'32MHz to Prescaller of 256 gives 125000 clock to T/C module.
'Set TOP to 125, i.e. divide by 125, for 1000 Intr/s per Second.
'Actually set for 124, to account for roll over from TOP to 0.
'Also added a 3-Tone's per Beep, Piezo-Beeper routine.
'Beep is program driven, and therefore ties up the micro.
'Fine for testing for now.
'This works.


'...............................................................................
'Hardware Setup and Notes:
'XMega runs at 2 MHz on startup, default.
'Note: The Vtarget pin on PDI 6-Pin Header is tied to the PCB's 3.3V line.
'This is sourced from an LDO which is powered from the USB Port.

'USART to USB Bridge:
'PortE.2 = RxD0
'PortE.3 = TxD0
'PortA.4 = RTS Hand Shake
'PortA.5 = CTS Hand Shake

'Piezo
'PortB.0 via NFet

'LED
'PortB.1 Active Low

'3-Axis Accelerometer, MMA8453Q
'I2C Interface.  +/-2/4/8g, 10-Bit resolution.
'PCB has external pull-ups on SCL & SDA lines.
'PortE.1 = SCL
'PortE.0 = SDA
'Accel Interrupt #2 goes to Xmega PortA.2
'Accel Interrupt #1 is not tied to Xmega.

'SPI Serial Flash Memory Chip: Atmel AT25DF041A
'On SPI bus.
'PortA.1 is used for the Chip Select.

'3 Char LCD has its own PIC uC driver.
'Send it serial data via PortD.3.
'See XME Manual for the protocol.

'XME has an External 32kHz Xtal, on PR0 & PR1.

'Audio Driver to Headphones:
'Driven by Xmega DAC(s).
'Xmega controls the audio amp's ShutDown\ signal.
'PortD.4 to Audio Amp ShutDown\   Low for normal audio output mode.
'PortB.2 = DAC0 signal
'PortB.3 = DAC1 signal

'External Relay/Inductive Load Driver:
'High = NFet is On.  Max is 14V, designed for +12.
'Switches to common Ground.
'Typically 400 mA per channel, Rds ON < 1.5 ohms.
'PortD.0 controls DR0 NFet, available on Header.
'PortD.1 controls DR1 NFet, available on Header.

'The Mini-Add On PCB has a Reset Push Button Switch
'and a Standard 6-Pin PDI Header.
'Pin #1 is furtherest from the PB Switch, and elevated furthest from
'the surface of the PCB.

'Port C is brought out on the XME Header.
'Note PortC.6 and portC.7 are swapped in non-sequential order.

'Push Button Switch:
'PortD.2    Uses the Internal PullUp Resistor.


'Xmega PortA:
'PortA.0 = N/C
'PortA.1 = To Serial Data Flash chip's CS
'PortA.2 = Accel Interrupt #2 input to Xmega
'PortA.3 = ADC #5 Input 5V Supply Monitor Input via Attenuator  V=(0.149)*Vusb
'PortA.4 = USART to USB RTS Hand Shake Signal
'PortA.5 = USART to USB CTS Hand Shake Signal
'PortA.6 = ADC #6 Input via Header Pin 9
'PortA.7 = ADC #7 Input via Header Pin 11

'Xmega PortB:
'PortB.0 = To Piezo, via NFet
'PortB.1 = To LED, Active LOW
'PortB.2 = To Audio Amp DAC0 signal
'PortB.3 = To Audio Amp DAC1 signal
'PortB.4 = N/A
'PortB.5 = N/A
'PortB.6 = N/A
'PortB.7 = N/A

'Xmega PortC:
'PortC.0 = Ext Header Pin 18
'PortC.1 = Ext Header Pin 16
'PortC.2 = Ext Header Pin 14
'PortC.3 = Ext Header Pin 12
'PortC.4 = Ext Header Pin 10
'PortC.5 = Ext Header Pin  8
'PortC.6 = Ext Header Pin  4 Non-Sequential
'PortC.7 = Ext Header Pin  6 Non-Sequential

'Xmega PortD:
'PortD.0 = To External Relay Driver NFet, DR0 Signal, on Header Pin 17
'PortD.1 = To External Relay Driver NFet, DR1 Signal, on Header Pin 19
'PortD.2 = To PB Switch to Gnd.  Uses the Internal PullUp Resistor
'PortD.3 =  To 3-Char LCD, Serial Driven
'PortD.4 =  Audio Amp ShutDown\ Control, Low = Audio Active
'PortD.5 =  MOSI
'PortD.6 =  MISO
'PortD.7 =  SCK

'Xmega PortE:
'PortE.0 = To Accelerometer, I2C SDA, has External Pullups
'PortE.1 = To Accelerometer, I2C SCL, has External Pullups
'PortE.2 = To USART to USB Bridge, RxD0
'PortE.3 = To USART to USB Bridge, TxD0
'PortE.4 = N/A
'PortE.5 = N/A
'PortE.6 = N/A
'PortE.7 = N/A

'Xmega PortR:
'PortR.0 =  32 kHz Xtal2
'PortR.1 =  32 kHz Xtal1


'-----------------------------------------------------------------------------------------

$regfile = "xm32a4def.dat"                                  ' specify the used micro

'$crystal = 20000000                                         ' used crystal frequency
'$crystal = 32768                                            ' used crystal frequency
'$crystal = 8000000                                          ' used crystal frequency
'$crystal = 14745600                                         ' used crystal frequency
'$crystal = 2000000                                          ' used crystal frequency
$crystal = 32000000

'$baud = 19200                                               ' use baud rate
$hwstack = 64                                               ' default use 32 for the hardware stack
$swstack = 40                                               ' default use 10 for the SW stack
$framesize = 40                                             ' default use 40 for the frame space

'.............................................................................
'include the following lib and code, the routines will be replaced since they are a workaround
 $lib "xmega.lib"
 $external _xmegafix_clear
 $external _xmegafix_rol_r1014
'.............................................................................

   'Set Up 32 MHz Int OSC:
   'first enable the osc of your choice
   Config Osc = Enabled , 32mhzosc = Enabled
   'Configure the systemclock
   Config Sysclock = 32mhz , Prescalea = 1 , Prescalebc = 1_1

    Waitms 500                                              'Startup Stabilization Delay

   'Configure Port A:
   'Set for Inputs for now.
   'USART will override this.
   'Change PortA.1 for Serial Flash when test it.
   Porta_pin0ctrl = 0                                       '0 d = Input, no pullups
   Porta_pin1ctrl = 0                                       '0 d = Input, no pullups
   Porta_pin2ctrl = 0                                       '0 d = Input, no pullups
   Porta_pin3ctrl = 7                                       '7 d = Disable "Input Buffer" for ADC
   Porta_pin4ctrl = 0                                       '0 d = Input, no pullups
   Porta_pin5ctrl = 0                                       '0 d = Input, no pullups
   Porta_pin6ctrl = 7                                       '7 d = Disable "Input Buffer" for ADC
   Porta_pin7ctrl = 7                                       '7 d = Disable "Input Buffer" for ADC

   Porta_dir.0 = 0                                          'A.0 = Input N/C
   Porta_dir.1 = 0                                          'A.1 = Input Serial Data Flash CS
   Porta_dir.2 = 0                                          'A.2 = Input Accel Intr #2
   Porta_dir.3 = 0                                          'A.3 = Input ADC #5, USB Voltage Monitoring
   Porta_dir.4 = 0                                          'A.4 = Input USART to USB RTS Hand Shake
   Porta_dir.5 = 0                                          'A.5 = Input USART to USB CTS Hand Shake
   Porta_dir.6 = 0                                          'A.6 = Input ADC #6 Input via Header
   Porta_dir.7 = 0                                          'A.7 = Input ADC #7 Input via Header


   'Configure Port B, (Lower Nibble Only, Upper Nibble doesn't exist):
   'Set for
   Portb_pin0ctrl = 0                                       '0 d = Totum, no pullups
   Portb_pin1ctrl = 0                                       '0 d = Input, no pullups
   Portb_pin2ctrl = 0                                       '0 d = Input, no pullups
   Portb_pin3ctrl = 0                                       '0 d = Input, no pullups

   Portb_dir.0 = 1                                          'B.0 = Output  To Piezo NFet
   Portb_dir.1 = 1                                          'B.1 = Output  To LED Act Low
   Portb_dir.2 = 1                                          'B.2 = Output  DAC to Audio Amp
   Portb_dir.3 = 1                                          'B.4 = Output  DAC to Audio Amp


   'Configure Port C:
   'Set for Inputs for now.
   'This Port is available on the Header.
   Portc_pin0ctrl = 0                                       '0 d = Input, no pullups
   Portc_pin1ctrl = 0                                       '0 d = Input, no pullups
   Portc_pin2ctrl = 0                                       '0 d = Input, no pullups
   Portc_pin3ctrl = 0                                       '0 d = Input, no pullups
   Portc_pin4ctrl = 0                                       '0 d = Input, no pullups
   Portc_pin5ctrl = 0                                       '0 d = Input, no pullups
   Portc_pin6ctrl = 0                                       '0 d = Input, no pullups
   Portc_pin7ctrl = 0                                       '0 d = Input, no pullups

   Portc_dir.0 = 0                                          'C.0 = Input via Header
   Portc_dir.1 = 0                                          'C.1 = Input
   Portc_dir.2 = 0                                          'C.2 = Input
   Portc_dir.3 = 0                                          'C.3 = Input
   Portc_dir.4 = 0                                          'C.4 = Input
   Portc_dir.5 = 0                                          'C.5 = Input
   Portc_dir.6 = 0                                          'C.6 = Input
   Portc_dir.7 = 0                                          'C.7 = Input


   'Configure Port D:
   'Set for
   'To LCD Driver, PB Sw Input, Relay Drvr outputs, MOSI, MISO, SCK.
   Portd_pin0ctrl = 0                                       '0 d = Totum, no pullups
   Portd_pin1ctrl = 0                                       '0 d = Totum, no pullups
   Portd_pin2ctrl = 24                                      '0 d = Input, Uses pullups
   Portd_pin3ctrl = 0                                       '0 d = Totum, no pullups
   Portd_pin4ctrl = 0                                       '0 d = Totum, no pullups
   Portd_pin5ctrl = 0                                       '0 d = Input, no pullups
   Portd_pin6ctrl = 0                                       '0 d = Input, no pullups
   Portd_pin7ctrl = 0                                       '0 d = Input, no pullups

   Portd_dir.0 = 1                                          'D.0 = Output, Ext Relay Drve, via Header
   Portd_dir.1 = 1                                          'D.1 = Output, Ext Relay Drve, via Header
   Portd_dir.2 = 0                                          'D.2 = Input, PB Switch, Uses Internal Pull Up
   Portd_dir.3 = 0                                          'D.3 = Input
   Portd_dir.4 = 1                                          'D.4 = Output, Audio Amp ShutDown\, Low = Audio Active
   Portd_dir.5 = 0                                          'D.5 = MOSI  Set up separately
   Portd_dir.6 = 0                                          'D.6 = MISO  Set up separately
   Portd_dir.7 = 0                                          'D.7 = SCK   Set up separately

   'Configure Port E, (Lower Nibble Only, Upper Nibble doesn't exist):
   'USART to USB Bridge and Accel chip, (I2C)
   'Must set PortE.3, TxD0 to output for USART to work.
   Porte_pin0ctrl = 0                                       '0 d = Totum, no pullups
   Porte_pin1ctrl = 0                                       '0 d = Input, no pullups
   Porte_pin2ctrl = 0                                       '0 d = Input, no pullups
   Porte_pin3ctrl = 0                                       '0 d = Input, no pullups

   Porte_dir.0 = 0                                          'E.0 = Input, Set up later as I2C SDA
   Porte_dir.1 = 0                                          'E.1 = Input, Set up later as I2C SCL
   Porte_dir.2 = 0                                          'E.2 = Input,  RxD0
   Porte_dir.3 = 1                                          'E.3 = Output, TxD0

'....................................................................................................

   Dim J As Byte
   Dim D As Byte                                            'LCD Chaser LED Counter
   Dim Jxb As Byte                                          'PB Switch

   Dim Pbsw0 As Byte                                        'Push Button Switch 0 Status

   Dim Tonecnt As Word                                      'Number of pulses per Sound loop
   Dim Tonelp As Word                                       'Number of Sound times through loop
   Dim Toneperiod As Word                                   'Adjustment for Tones Period, uSec
   Dim Toneperiod2 As Word                                  'Escalating Tone Period

   Dim Lpcnt1 As Word                                       'Loop Counter
   Dim Lpcnt2 As Word                                       'Loop Counter
   Dim Isrcnt As Word                                       'ISR Counter TCD0, 1 intr q mSec

   Piezo Alias Portb_out.0                                  'Piezo
   Led Alias Portb_out.1                                    'LED, Active LOW
   Load0 Alias Portd_out.0                                  'Ext NFet Load Driver 0
   Load1 Alias Portd_out.1                                  'Ext NFet Load Driver 1
   Pbsw Alias Portd_in.2                                    'PB Switch, Push = Gnd

   Tonecnt = 300
   Tonelp = 3                                               'Three tones per "Beep"
   Isrcnt = 0                                               'Init ISR Counter to 0

   'Set up Port D Timer/Counter #0 for generating a High Level Interrupt.
   'No PWM waveform is generated on any I/O Pins.
   'Assumes uC Clock is 32 MHz.
   'Partially uses Bascom, partially uses direct control of the Registers.
   '32 MHz uC Clock with PreScaler div by 256 gives 125000 clock into T/C.
   'T/C Top set to 124, (div by 124), gives 1000 Intr / Sec.
   'i.e. Divide by 125, but have to account for the roll over from TOP to 0.
   'Bascom combines PER Low and PER High for the user.
   Config Priority = Static , Vector = Application , Hi = Enabled
   Tcd0_ctrla = &B00000110                                  'Divide by 256
   Tcd0_ctrlb = &B00000000                                  'Normal Mode
   Tcd0_intctrla = &B00000011                               'Enable OverFlow Intr, High Level
   Tcd0_intctrlb = &B00000011                               'Channel A, High Level Intr
   Tcd0_per = 124                                           'PER  124 Dec

   On Tcd0_ovf Isrtcd0                                      'ISR Timer/Counter D #0
   Enable Tcd0_ovf , Hi                                     'Enable as High Interrupt

   Enable Interrupts                                        'Global Enable Interrupts

Premain:

   Gosub Xbeep                                              'Beep on Start-Up of Program

Main:

   Do

   'Test routines go here....

   Loop                                                     'Forever

Isrtcd0:
   'ISR Timer/Counter D #0
   'Assumes uC Clock = 32 MHz
   'Set for 1000 Intr / Sec, i.e. 1 Intr q mSec
   'On Entry have: ISRCnt

   Isrcnt = Isrcnt + 1

   If Isrcnt < 50 Then
      'Turn On LED
      Led = 0                                               'Active Low
   Else
      'Turn Off LED
      Led = 1                                               'Active Low
   End If

   If Isrcnt > 1000 Then
      Isrcnt = 0                                            'Roll Over q 1 Second
   End If

   Return

Xbeep:
   'Beeping Piezo via XMega.
   'Prog driven, not ISR driven.
   'Currently a sequence of three beeps, increasing in frequency each beep.
   'Pulse the piezo to do this, are using an asymetric pulse for now,
   'not a 50% duty cycle.
   'This ties up the micro, as it isn't ISR driven.
   'On Entry have: ToneLp  The number of individual tones played per "Beep" call.
   'On Entry have: ToneCnt The number of hardware pulses to the piezo to
   'make it beep.

   Toneperiod = 200                                         'Init Tone Period Adjustment, uSec
   Toneperiod2 = Toneperiod                                 'Init period, then adj it per beep

   For Lpcnt1 = 1 To Tonelp                                 'Loop counter
      For Lpcnt2 = 1 To Tonecnt                             'Number of pulses
         Piezo = 1                                          'Piezo
         Waitus Toneperiod
         Toneperiod2 = Toneperiod + 100
         Piezo = 0
         Waitus Toneperiod2
      Next Lpcnt2
      Waitms 50                                             'Intra-Beep pause
      Toneperiod = Toneperiod - 50
   Next Lpcnt1
   Return

Flashled:
   'Flash the on board LED at 1 Hz
   'Software driven with delays
   'Assumes 32 MHz Clock
   Do
      Led = 1                                               'Off, Active Low
      Waitms 500
      Led = 0                                               'On, Active Low
      Waitms 500
   Loop                                                     'Forever
   Return                                                   'Null and Void

Readsw:
   'Read the Push Button Switch Input.  Unpressed = pulled high.
   'No Debounce included.
   'Turn On the LED if the PB Switch is pressed.
   'Or Beep the Piezo, program driven for now.
   If Pbsw = 0 Then
      'PB Switch is pressed
      'Gosub Xbeep
      Led = 0                                               'LED On, Active Low
   Else
      'PB Switch is not pressed
      Led = 1                                               'LED Off
   End If
   Return
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
angelu
PostPosted: Jan 22, 2012 - 08:36 PM
Resident


Joined: May 28, 2006
Posts: 718
Location: Toronto, Canada

Quote:
Have to be fixed.

It is fixed now. It reads the hex file every time Start button is clicked.
Quote:
a progress-bar during programming would be nice

Progress-bar added.
Quote:
And does it actually verify the uploaded code ? All I see is the sequence "Read fuses" and "Write flash memory" and "Done" in the lower left corner of the BL IDE.

Yes, it does. If you not check the "Verify" box, a slightly increase in speed can be noticed. The idea was not to wait until all flash is written and then to check it if something is wrong. You can test on a locked micro trying to reprogram. The verification is done page by page. During the verification, data is not sent nor read by PC again but it is checked against the one in ram used for writing. I suppose the data in ram is reliable since it is sent with two CRC bytes at the end.
When "Erase" is checked, it will erase page by page right before the writing for all memory. If it is not checked, it will erase only pages that are supposed to be written. You can save time this way.
George.

_________________
www.sofgel.ro bootloader for mega and xmega
www.elsofgel.com XME development board
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
Plons
PostPosted: Jan 22, 2012 - 09:35 PM
Raving lunatic


Joined: Nov 01, 2005
Posts: 6356
Location: Hilversum - the Netherlands

Okay, I will download the new BL IDE. Thanks for the fix.

Doc, that defenition is not in the reg-file ? Thanks for posting your program.

@all: it's quite fun to play around with the XME. I need to familiarize myself with the Xmega's. And I don't see that as something bad !

Nard

Edit: new bootloader BL IDE works as a charme now. That was a quick fix ! Thanks.

Note: no update in revision level. I dumped the earlier version.

_________________
Dragon broken ? Or problems with the Parallel Port Programmer ? Scroll down on my projects-page http://www.aplomb.nl/TechStuff/TechStuff.html for tips
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
Bingo600
PostPosted: Jan 23, 2012 - 06:40 PM
Raving lunatic


Joined: Apr 25, 2004
Posts: 3817
Location: Denmark

Got mine today Smile

Thanx George

/Bingo
 
 View user's profile Send private message  
Reply with quote Back to top
alank2
PostPosted: Jan 23, 2012 - 07:19 PM
Posting Freak


Joined: Jul 16, 2009
Posts: 1587


Picked up mine today too! Thanks George!
 
 View user's profile Send private message  
Reply with quote Back to top
Bingo600
PostPosted: Jan 23, 2012 - 08:10 PM
Raving lunatic


Joined: Apr 25, 2004
Posts: 3817
Location: Denmark

@George

I can't seem to get the Linux bootloader going.

It just hangs saying reading fuses 0%

Ubuntu 10.04 LTS

CP210x seen fine as ttyUSB0


Quote:
Jan 23 21:01:47 x60-2 kernel: [12279.729054] usb 4-1: new full speed USB device using uhci_hcd and address 4
Jan 23 21:01:47 x60-2 kernel: [12279.903269] usb 4-1: configuration #1 chosen from 1 choice
Jan 23 21:01:47 x60-2 kernel: [12279.910990] cp210x 4-1:1.0: cp210x converter detected
Jan 23 21:01:47 x60-2 kernel: [12280.021075] usb 4-1: reset full speed USB device using uhci_hcd and address 4
Jan 23 21:01:47 x60-2 kernel: [12280.171255] usb 4-1: cp210x converter now attached to ttyUSB0


Modified .INI file to /dev/ttyUSB0 , selected Xmega32A4 , and Baud 115.200
Quote:
[Settings]
cboxResetDevice=1
cboxEraseEeprom=0
cboxEraseFlash=1
cboxWriteEeprom=0
cboxWriteFlash=0
cboxVerifyFlash=0
UARTx=2
SerialNumber=
OscillatorTypeItemIndex=4
ExtOscFreq=8000000
ClockDividerItemIndex=0
PllFactorItemIndex=4
PllClockSourceItemIndex=0
DeviceItemIndex=6
BaudRate=115200
BootLoadSize=2048
intBootLoadSize=2048
SerialPortDevice=/dev/ttyUSB0
AppFlashFileName=/home/1-Xmega/1-XME-Board-George/XME_1_1.hex
ConnString=0500013977B6


This is console startup msg
EasyBootXAVR.1.4LIN-128$ ./EasyBootAVR_1_4
[WARNING] Out of OEM specific VK codes, changing to unassigned
[WARNING] Out of unassigned VK codes, assigning $FF

See attached png.
 
 View user's profile Send private message  
Reply with quote Back to top
angelu
PostPosted: Jan 24, 2012 - 01:02 AM
Resident


Joined: May 28, 2006
Posts: 718
Location: Toronto, Canada

It seems that the existing driver for CP210x does not fully support CP2104.
See this
http://www.spinics.net/lists/linux-usb/msg56962.html

I tested the bootloader IDE in Ubuntu 10.4 with a standard serial port and it is working.
George.

_________________
www.sofgel.ro bootloader for mega and xmega
www.elsofgel.com XME development board
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
tpappano
PostPosted: Jan 24, 2012 - 07:24 AM
Raving lunatic


Joined: Dec 01, 2003
Posts: 2507


Goodies arrived today George, XME board and EasyBoot work fine, now for some tinkering! Thanks again!

_________________
Tom Pappano
Tulsa, Oklahoma
 
 View user's profile Send private message  
Reply with quote Back to top
Bingo600
PostPosted: Jan 24, 2012 - 06:58 PM
Raving lunatic


Joined: Apr 25, 2004
Posts: 3817
Location: Denmark

angelu wrote:
It seems that the existing driver for CP210x does not fully support CP2104.
See this
http://www.spinics.net/lists/linux-usb/msg56962.html

I tested the bootloader IDE in Ubuntu 10.4 with a standard serial port and it is working.
George.


Hmmm ... It kinda renders the built-in USB i/f useless @ Linux
Unless you want to roll your own kernel.


/Bingo
 
 View user's profile Send private message  
Reply with quote Back to top
angelu
PostPosted: Jan 24, 2012 - 07:20 PM
Resident


Joined: May 28, 2006
Posts: 718
Location: Toronto, Canada

This happen with new devices.
What about Ubuntu 11 ?
I will contact a Silicon Lab rep.

_________________
www.sofgel.ro bootloader for mega and xmega
www.elsofgel.com XME development board
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
Bingo600
PostPosted: Jan 25, 2012 - 01:54 PM
Raving lunatic


Joined: Apr 25, 2004
Posts: 3817
Location: Denmark

@George
It seems that CP2104 support is in Kernel 3.x

But based on previous experience , im only using Ununtu LTS versions (latest is 10.04) w. Kernel 2.6.38

I tried to build a driver yesterday from Silabs , but the latest was corrupt on download (several tines)
And the previous had tonzz of build errors.

Edit:

But i guess this was one of the purposes of your nice offer.
To discover those "unplesanties" Smile


/Bingo
 
 View user's profile Send private message  
Reply with quote Back to top
Mongooose
PostPosted: Jan 25, 2012 - 06:25 PM
Hangaround


Joined: Sep 25, 2008
Posts: 114
Location: Alabama Gulf Coast

I received mine, Thanks again George.

I have not had much time to play with it yet, but do have the boot loader running fine (and led blinky running) in WinXP sp3, will use win7 64bit later.

Thoughts on the hardware, A taller user button to make it easier to press (reset is fine). Also an option to have the expansion header mounted upside down to mount a board without enlarging size (other than thickness) and without covering LCD screen is about only other thing I can think of that has not been mentioned already.
 
 View user's profile Send private message  
Reply with quote Back to top
Bingo600
PostPosted: Jan 25, 2012 - 07:30 PM
Raving lunatic


Joined: Apr 25, 2004
Posts: 3817
Location: Denmark

For anyone using a AVRISP-MKII
Here is a quick connection guide (PDI)
http://blog.frankvh.com/2009/09/22/avr- ... vrisp-mk2/

/Bingo
 
 View user's profile Send private message  
Reply with quote Back to top
DocJC
PostPosted: Jan 25, 2012 - 07:35 PM
Raving lunatic


Joined: Dec 11, 2007
Posts: 6982
Location: Cleveland, OH

To add to Bingo's comment:

The AVRISP mkII cable has lead one marked with a red wire.

With the Mini-PCB connected to the MXE plug the mkII cable connector in so that the red wire is at the end of the 6-Pin connector farthest from the little Reset push button switch on the Mini-PCB.

JC
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
angelu
PostPosted: Jan 26, 2012 - 04:13 AM
Resident


Joined: May 28, 2006
Posts: 718
Location: Toronto, Canada

Today I installed Ubuntu 11.10 with kernel 3.0.0-15 but still no luck Sad

_________________
www.sofgel.ro bootloader for mega and xmega
www.elsofgel.com XME development board
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
DocJC
PostPosted: Jan 26, 2012 - 08:30 PM
Raving lunatic


Joined: Dec 11, 2007
Posts: 6982
Location: Cleveland, OH

Hi George,

Clearly a lot of work went into the XME design!
It is a very nice Xmega platform to work with.
I have the LCD, Piezo, USB Bridge, and PB Switch up and running.
The External Memory and the Accelerometer will obviously take a little bit more effort.

I thought I'd mention something here that might otherwise go un-noticed, and potentially damage the device. I did not wish anyone to inadvertantly do so. Perhaps Manual Ver 2 could include a line or two about this:

Some AVR Programmers just monitor the Vtarget voltage on the programming headers to adjust the programmer's output voltage to match that of the target board being programmed.

Other programmers, like the STK500, (Which, admittantly would not be used for PDI programming), can supply power to run the target PCB via the Vtarget pin on the programming header.

If one were not using the USB port connection on the XME, and was instead just using it as an Xmega development platform, one might consider powering the XME from their programmer, via the Vtg pin on the programming header. (One less cable in the way, "Testbed" not tied to PC, etc.)

Although convenient, this is probably not a good thing to do.

The potential problem, (no pun intended), is that back-powering the XME board through the Vtg pin on the programming header at 3 or 3.3 Volts will also supply 3.3 V to the Vout pin of the voltage regulator, (the MCP1725).

In this mode, however, the voltage regulator's Vout will be more than 0.3 V greater than the voltage regulator's input, Vin.

Although some voltage regulators might tolerate Vout > Vin, the Electrical Spec's state that no pin can have a voltage greater than Vin + 0.3 V. (Vout exceeds this in this mode.)

I asked MicroChip if the "non-powered" mode of the voltage regulator was an exception to this rule, and Vout could be > (Vin + 0.3) and they said no.

A schottky diode directly across Vin and Vout, reverse biased, would solve this.

An alternative solution would be to use an adjustable version of the voltage regulator and run it at 3.3 V + Vdiode with a forward biased diode in the output, powering the rest of the circuit, and blocking any back-feed to the voltage regulator in a non-USB powered mode.

I do not know if the MCP1725 will really care about this or not, I don't have any sitting on my bench to test it. But regardless it would be out of spec.

I don't know exactly which PDI capable programmers can source out of the Vtg pin, (I have one which can), but perhaps either Ver 2 of the PCB could include the diode, or Ver 2 of the Manual should include a warning.

Such an event would no doubt be a rare occurrence, but I thought it worth mentioning least someone discover this the hard way.

Keep up the good work. I like the XME.

JC

Edit: Typo.


Last edited by DocJC on Jan 26, 2012 - 10:07 PM; edited 1 time in total
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
Plons
PostPosted: Jan 26, 2012 - 09:15 PM
Raving lunatic


Joined: Nov 01, 2005
Posts: 6356
Location: Hilversum - the Netherlands

Good catch, Doc.
So the voltage regulator is an issue (not a problem), but also the Xmega and flash mem don't like a Vcc of 5V.

How about this as ECN in the next generation: a resistor of 1k between Vcc on the PDI connector and the local 3.3V ? The Xmega, displaydriver (avoiding the brand Laughing ), flash memory, amplifier etc. will draw more than 1.7mA, so the 1k will be high enough to keep them safe.
I can check with the STK600 if that 1k effects the read back voltage; Dragon may be harder since I don't want to upgrade it (no AVR Studio5 for me). But I can give it a try.

Nard

_________________
Dragon broken ? Or problems with the Parallel Port Programmer ? Scroll down on my projects-page http://www.aplomb.nl/TechStuff/TechStuff.html for tips
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
angelu
PostPosted: Jan 26, 2012 - 10:13 PM
Resident


Joined: May 28, 2006
Posts: 718
Location: Toronto, Canada

Quote:
A schottky diode directly across Vin and Vout, reverse biased, would solve this.

The linear regulator has one diode on the power P mosfet (see picture). The linear regulator is 500mA rated and at the input of the regulator there is also an external diode, so all what that internal diode has to power is the internal circuits which I estimate to take less than 1mA.
If I would have put the diode after the regulator, then the voltage after the diode would have been compromised. The voltage drop for a diode depends on the current.
I am not concerned at all that a 3.3V voltage on the external connector would damage it when not connected to USB.
Quote:
How about this as ECN in the next generation: a resistor of 1k between Vcc on the PDI connector and the local 3.3V ?

The fact there is a 500mA regulator there is to provide power to some potential loads connected to the board. Some extensions (shields) for this board will follow soon. Having there a resistor would compromise this.
STK600 do not allow you to set a voltage higher than 3.3V as long as you have an Xmega selected.
Well, I know, I have to put these things on the manual.
Anyway, thanks for your attention.
George.

_________________
www.sofgel.ro bootloader for mega and xmega
www.elsofgel.com XME development board
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
DocJC
PostPosted: Jan 26, 2012 - 10:29 PM
Raving lunatic


Joined: Dec 11, 2007
Posts: 6982
Location: Cleveland, OH

Quote:
I am not concerned at all that a 3.3V voltage on the external connector would damage it when not connected to USB.


That's fine, but you need to realize that the voltage regulator is still being operated out of spec IF one powers the XME via the programming header, (at 3 V), or if someone powers it via the power connection on the 2x10 Header.

The hard spec, written by MicroChip, is that Vout can't be more than 0.3 V above Vin. With the External FET and the External (input) diode, Back-Powering this chip will be out of spec.

An additional schottky diode, directly across the voltage regulator fixes this. Completely.

But, it is totally your call as to whether you do this or not. Engineering is about trade offs.

My point is I want to be sure you understand the decision you are making. I am NOT trying to force you to change any thing.

I said it before, and I'll repeat it: You did a very nice job. It is much easier for use to critique a design than it is for one to create a design.

JC
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
DocJC
PostPosted: Feb 15, 2012 - 02:23 PM
Raving lunatic


Joined: Dec 11, 2007
Posts: 6982
Location: Cleveland, OH

Nard,

Have you had a chance to test the XME's Serial Flash Memory with Bascom yet?

(A simple Erase Chip and then Write to Location 000h, followed by Reading back from location 000h?)

If so, I would be interested in seeing how this was performed.

If not, not a problem.

JC
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
Plons
PostPosted: Feb 15, 2012 - 02:51 PM
Raving lunatic


Joined: Nov 01, 2005
Posts: 6356
Location: Hilversum - the Netherlands

Doc wrote:
Quote:
Have you had a chance to test the XME's Serial Flash Memory with Bascom yet?

No. Not found a timeframe to do that. Too many other things absorbed the available time.
Sorry for that.

Nard

_________________
Dragon broken ? Or problems with the Parallel Port Programmer ? Scroll down on my projects-page http://www.aplomb.nl/TechStuff/TechStuff.html for tips
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
DocJC
PostPosted: Feb 15, 2012 - 03:01 PM
Raving lunatic


Joined: Dec 11, 2007
Posts: 6982
Location: Cleveland, OH

Not a problem!

I know the "Too many things..." all too well!

JC
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
angelu
PostPosted: Feb 17, 2012 - 05:03 AM
Resident


Joined: May 28, 2006
Posts: 718
Location: Toronto, Canada

I wrote a PC application as support for XME. It allows you to read the pins states, read (512Mbytes in 5sec at 1Mbps) and write the serial flash, handle the LCD, buzzer, LED and accelerometer.
See a video here:
http://www.youtube.com/watch?v=hI9hGbGwPxM

You need to upgrade the firmware on the board as well. Firmware project and PC application can be downloaded from
http://elsofgel.com/index.php?route=pro ... duct_id=50
or
http://www.sofgel.ro/vechi/language/en/article/xme.html .
I also added 230400, 460800, 921600, 1Mbps and 2Mbps for the boot loader.
George.

_________________
www.sofgel.ro bootloader for mega and xmega
www.elsofgel.com XME development board
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT + 1 Hour
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2006 The PNphpBB Group
Credits