Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

using Ft232 via Atxmega128

Status
Not open for further replies.

amirone1

Newbie level 3
Newbie level 3
Joined
May 12, 2012
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,308
Hi,
I wanted to use Ft232, to connect my micro to PC.I use codevision to code my Micro atxmega 128.I am reading from ADC, I want to send the read value via FT232. I don`t know how should I do it, I don`t know syntax and any thing that I should define and anything to set baud rate. I want a sample code for this task, or atleast commands, for example I used LCD I wrote LCDputsf, and I included LCD.h, I want to know what should I use in FTD. for example, FTD.h or something like this & commands to send value from TXD line.
 

the FTD chip is connected to your serial port,so while coding just consider it as a normal serial port and u have to include the header file for serial communication and use the serial communication functions
 
You are defining the speed of FT232 on your PC. When you are connecting such a device to the PC and installing its drivers then it is seen as a serial port like sherazi said. Then you are opening this port with given speed. You can use for example Hyperterminal to get a simple console. If you will be programming some application then you will have to use some libraries for serial port connection. Those libraries will have possibility to open this port with given speed as well.

From the microcontroller point of view it will be connected to FT232 TX, RX etc. pins so it will be seen as a normal UART communication chip. To configure the speed of microcontroller's UART you must to configure the configuration registers.

When you do both this things and match the speed and the frame shape (it should be the same on both sides!) then whatever you will put onto transmit registers (buffers) on PC or microcontroller it will appear on second side.

Now, do you need a sample code for microcontroller or for PC? If for PC then in what programming language and on which platform?
 
thanks for replies.
umm... I had never used a serial port too. I need to know how should i write in codevision to send data '1' from UART to FTD and I don`t know how should I configure baud rate speed in codevision. I know how to read sent data in PC. but I am don`t know exactly how should I say this number should be sent. I want to know syntax.
+ which libraries I should add?
 

thanks anyway.
I prefer to use codevision but infact the code is simple so any other way to write it would be ok, so if you know how to do it with any other compiler I would be grateful.
 

What controller you are using? There's no Atxmega128. It is ATmega128 or Xmega128.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top