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.

control i/o ports of AVR using TCP/IP

Status
Not open for further replies.

yashmodi

Newbie level 6
Joined
Jul 28, 2005
Messages
11
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,400
networking avr with tcp/ip

i have ported UIP0.9 on an ATmega32 interfaced to RTL8019AS and implemented a simple web server that return a webpage with updated temperature readings...

......how can i control the I/O ports of the microcontroller using the same interface...??

read about cgi programming and tried to understand the included http port of uip using CGI but could not understand it much.....it would be gr8 if someone could help me out..
thnx...
yash
 

uip-avr schematic

You have to understand that UIP provides a simple TCP/IP connection just like any other TCP/IP stack. When a client opens a socket on the server, it can send any data it likes. The server can be programmed to respond to commands in packets from client and in turn switch any I/O ports.
 

avr tcp

yashmodi, i was trying to answer that in details but subject requires more than 6 hours to give a detailed conclusion. In brief you should:
a. write function to set and read port outputs . Better to put it into cgi.c. You should add it to cgi function pointer table so it will be called from cgi script under name 'd'

b. write html containing html form and put it into fsdata.c source code .

c. update , let say index.html with link to this newly created form page (step b)

d. write script page to handle browser request , when invoked from form page (created in step b). It should also be put into fsdata.c soruce file
that script should contain reference to newly created cgi.c functions.

e. cgi.c function created in step 'a' will be invoked while running script created on step d. It should parse uip_appdata[] buffer to extract post GET request parameters and replay back with result (part of html page as a result)
Set the action option for form tag in html to cgi script filie name (for file created in step b)
<form name=xxx method=GET action=/cgi/your script name >


That is very brief and is not complete

Yet , remeber that file data in fsdata contains file name starting from first character in file data buffer till first null value character (serving as terminator), then rest is the file content .


Or , you can intercept the GET in httpd.c file and ignore script handling at all .
 

avr tcp/ip implementation

thnx a lot dude...will work on that and post a reply...kinda got a good idea...
 

how to tcp/ip programming with avr

Hi all,
I have a circuit about tcp/ip system.But I don't know how to transfer data from AVR microcontroller to other device on network.
Does anyone help me?Please give me a sample
if I want to transfer "12345" string from AVR to other device on network.
My email is : luongvinhphu1003@yahoo.com
Best regards.
 

avr tcp ip

You can try this..

**broken link removed**

regards,
 

avr send ping

Truclam said:
Hi all,
I have a circuit about tcp/ip system.But I don't know how to transfer data from AVR microcontroller to other device on network.
Does anyone help me?Please give me a sample
if I want to transfer "12345" string from AVR to other device on network.
My email is : luongvinhphu1003(at)yahoo.com
Best regards.

You need a TCP/IP stack program/codes to be placed inside the uC, and for testing you can try to send "ping" to check whether the uC responding or not.
uIP from Adam Dunkels support protocol such as ICMP (for replying "ping") and last time i tried to compile it, with also NIC RTL8019AS driver (integrated in uIP AVR by Louis Beaudoin), it needed around 8KB for the latest version (uIP 0.9) and for the previous persion (uIP 0.6) it was around 6 KB.

And then you can try to make your own application by making a program in PC using socket programming and your own uC.

Read the uIP manual, it was quite helpfull
Another helpfull tool is ethereal, it is a tool for capturing the TCP/IP packet in the network,and it is free.

hope this helps,
regards,
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top