View previous topic :: View next topic |
Author |
Message |
51Magnum
Joined: 03 Feb 2006 Posts: 75 Location: Boise, Id
|
Posted: Mon Apr 24, 2006 8:43 pm Post subject: Send web page from CF Card |
|
|
Hello all,
I am really loving this site. You have answered 99% of all my questions without me posting anything.
However, I am now in need of some specific help.
I have a mega128 with a compact flash and a wiznet embedded ethernet board. I have successfully created a web page and have it currently stored in EEProm but I would like to use the compact falsh card now. How can I do it? I have tried to send a .jpg with no luck and am at a brick wall.
I should say I have everything working. I can GET and POST using the web server. I can write my data to a file on the compact flash card. But I am having trouble combining the two.
Can anyone give me some things to try?
Thanks |
|
Back to top |
|
|
zolsi
Joined: 24 Jan 2006 Posts: 51
|
Posted: Wed Apr 26, 2006 4:08 pm Post subject: |
|
|
would be interesting Did you find out how to do? |
|
Back to top |
|
|
bzijlstra
Joined: 30 Dec 2004 Posts: 1179 Location: Tilburg - Netherlands
|
Posted: Sat Apr 29, 2006 1:26 pm Post subject: CF or MMC |
|
|
Have done some work on CF cards. Made some low level routines and also used AVR-DOS. But now I am asking why I ever started using Compact Flash and not go for the MMC-card. Only a few lines for I/O and AVR-DOS is running with these cards.
Have fun
Ben Zijlstra |
|
Back to top |
|
|
51Magnum
Joined: 03 Feb 2006 Posts: 75 Location: Boise, Id
|
Posted: Fri May 12, 2006 5:14 am Post subject: |
|
|
I have an AVR Net Sprint web server so I have the option of having either one. And I just happened to have a CF card laying around. If I design my own I would use an MMC also.
I really enjoy your web site Ben. You have done some great things and I really appreciate you sharing your knowledge.
As for the web page from CF card goes. I got it all working and it is really simple. Just read in the file and send over the socket using TCPWriteStr. You can view it at http://71.33.27.139/index.htm, of course as long as I have it on and am not playing on it. I am no web page designer so look with that in mind.
Code: |
Do
Line Input #1 , Shtmltempstring ' read a line
Tempw = Tcpwritestr(i , Shtmltempstring , 255) ' Write web page
#if Debug
Print Shtmltempstring
#endif
Loop Until Eof(1) <> 0
|
Now for the frustrating part. If I have the Print statement in, i.e. Debug = 1. Everything loads just fine. However, if I take out that one line of code everything is corrupt when viewing from a web browser. It has to be a timing thing and I do not know what is going on. STRANGE!
Someone please help. Any idea is better then none. I see 87 views and only two replies to this post. I will try anything at this point.
I am having a lot of fun learning about AVR, BASCOM, HTTP etc. The internet is an amazing tool!!! |
|
Back to top |
|
|
zolsi
Joined: 24 Jan 2006 Posts: 51
|
Posted: Fri May 12, 2006 2:54 pm Post subject: |
|
|
waitms 10 ? |
|
Back to top |
|
|
51Magnum
Joined: 03 Feb 2006 Posts: 75 Location: Boise, Id
|
Posted: Fri May 12, 2006 5:09 pm Post subject: |
|
|
That makes me laugh
I tried to fiugre out how long of a delay causes it to not work and I am down to waitms 5. You were very close with 10 Zolsi!!!!
Thanks |
|
Back to top |
|
|
|