ATXMEGA16D4-AU/FTDI232

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

Hi,

 

I am starting a project where I'm thinking of programming the ATXMEGA16D4-AU chip with the FTDI232 USB UART. Can a "blank" ATXMEGA chip be programmed with the FTDI232? I have googled and I am getting mixed results.

 

Thanks!

Cody W Phipps

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

UPDI can for tinyAVR 1-series.

 

Considered a USB megaAVR running LUFA AVRISP2 instead of the FTDI USB UART?

 


https://github.com/mraardvark/pyupdi

http://www.fourwalledcubicle.com/AVRISP.php

 

"Dare to be naïve." - Buckminster Fuller

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

"Dare to be naïve." - Buckminster Fuller

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

Thanks! I'll digest this info and I'll see if I have any additional questions.

 

Thanks,

Cody 

Cody W Phipps

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

Short answer:  No.

 

The FTDI chip is a USB to USART bridge chip.

 

The new, out of the box, Xmega requires a PDI programmer, (or perhaps JTAG?).

 

So, you can't use the USART on the Xmega to upload your program to the micro when it is brand new.

 

However, if you have a PDI programmer, then you can put a Bootloader program in the Xmega which loads the program file via the USART, (which is attached to the FTDI chip, which is plugged into the USB on your PC).

 

At that point, however, you still need a PC program that will download the file to the Xmega's Bootloader.

Depending upon the Bootloader selected that may be already provided.

If you write your own Bootlaoder, (non-trivial), then you would have to write your on PC program to feed it data, unless you used some pseudo-standard format.

 

JC

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

Thanks JC, 

I sort of gathered what you were saying about putting the bootloading program on the Xmega from various, but the way you explained was easier for me to absorb. Thank you for that. I'm extremely new to programming the bare bones chips, so I imagine I have a lot to learn. I may have to use the ole trusty UNO for my first working prototype. 

Thanks again for your help!

Cody W Phipps

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

The PDI interface is just a half duplex UART and a RESET line. Does FTDI support half duplex? The RESET line can be controlled by one of the control signals like DTR.

 

I think it might be possible with some careful programming.

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

In LUFA, PDI is via a USART :

	/* Set up the synchronous USART for XMEGA communications - 8 data bits, even parity, 2 stop bits */

in https://github.com/abcminiuser/lufa/blob/master/Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.c (line 62)

via Downloads at http://www.fourwalledcubicle.com/LUFA.php (bottom)

 

"Dare to be naïve." - Buckminster Fuller

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

Indeed, I implemented PDI programming via USART for work a few years ago. With careful programming it should be entirely possible to use an FTDI cable to do it.

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

Splitting hairs here...

 

Atomic Zombie can make a video driver out of one nand gate...

That doesn't mean the rest of the world can.

 

The OP has an Xmega and a FTDI chip sitting on his desk, and wants to know if he can program his Xmega.

Short answer is still no, (IMHO).

 

Can it technically be done?

Perhaps.

But that potential possibility won't help get the OP further down the path of getting his current project done.

 

I don't think there is a turn key solution for turning a FTDI USB to USART bridge chip into an Xmega programmer, but I'd love to be shown otherwise!

 

JC 

 

 

 

 

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

gchapman wrote:

In LUFA, PDI is via a USART :

	/* Set up the synchronous USART for XMEGA communications - 8 data bits, even parity, 2 stop bits */

in https://github.com/abcminiuser/lufa/blob/master/Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.c (line 62)

via Downloads at http://www.fourwalledcubicle.com/LUFA.php (bottom)

 

and

phippstech wrote:

Hi,

 

I am starting a project where I'm thinking of programming the ATXMEGA16D4-AU chip with the FTDI232 USB UART. Can a "blank" ATXMEGA chip be programmed with the FTDI232? I have googled and I am getting mixed results.

 

Thanks!

 

    To gchapman:

    Did you catch the difference between UART and USART ?

    FTDI232 is not able to work in synchronous mode, or otherwise said, it does not provide a clock signal. This tells me you do not know FTDI232 well, and you do not know how PDI programming works. What about you contribute to this forum by letting skilled people to offer answers and you stop flooding this forum with links you do not know about ? 

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

DocJC wrote:

I don't think there is a turn key solution for turning a FTDI USB to USART bridge chip into an Xmega programmer, but I'd love to be shown otherwise!

JC 

 

+1.

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

angelu wrote:
Did you catch the difference between UART and USART ?
I did not

angelu wrote:
FTDI232 is not able to work in synchronous mode, ...
I was not aware

angelu wrote:
What about you contribute to this forum by letting skilled people to offer answers and you stop flooding this forum with links you do not know about ?
I will consider your order.

If one forum moderator will concur your order into this thread then I will obey your order.

Anyone, please feel free to report any of my posts.

 

"Dare to be naïve." - Buckminster Fuller

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

I think that I am going in a different direction with this. The ATXMEGA is probably too tall of a task for an inexperienced programmer like myself to tackle. I think I will just use a Atmega chip with the AVR pocket programmer. I believe I can use this with the RN2903 LoRa module that is included in my project. As long as both the programmer and the RN2903 can go to the same RESET pin. I plan on posting this project once I'm done and happy with the result. If any body sees an issue with doing it this way, please let me know and thanks for all the help. 

 

 

Cody W Phipps

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

angelu wrote: 

What about you contribute to this forum by letting skilled people to offer answers and you stop flooding this forum with links you do not know about ?

Knock it off.

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"Read a lot.  Write a lot."

"We see a lot of arses on handlebars around here." - [J Ekdahl]