Using SPI flash with a PIC18F452 to send a file to a modem

Jun 02, 2007 12 Replies

Hey,



I'm trying to connect an spi flash chip through a pic18f452 to a modem to send a file. I have initialised the flash, pic and modem but I am not sure how I go about sending the data to the modem. The flash chip has a collection of data produced by a datalogger and I need to either send it using gprs (probably by ftp) or by dialing into a server and uploading.



Does anyone have any tips for getting started with this?



Thanks!



Dial using AT commands (if supported by your modem) connected to mailbox: use x/y/zmodem ... connected to provider/internet: use an tcp/ip-stack to transfer via ftp etc

How do I send it to the tcp/ip stack, the flash i'm using is connected by spi bus to the pic.

Well, that would probably depend on which tcp/ip stack you are using. (the tcp/ip stack is a "driver" that you have to write (big), buy (expensive) or port if you find a suitable freeware)

I'd suggest that you partition the problem: use the embedded board to upload it, as previously suggested, using x/ymodem, to some other host (e.g. a PC). Then use the PC to talk TCP/IP. Adding TCP/IP to e.g. a PIC is nontrivial.

Steve

formatting link

I wish I could but unfortunately the board has to be fit and forget, I'm pretty resigned to the fact that I don't think its going to work! : (

I wish I could but unfortunately the board has to be fit and forget, I'm pretty resigned to the fact that I don't think its going to work! : (

Micochip has excellent FAE's that can help. Haven't done your particular application, but we use Microchip all the time, and if we need assistance, they are great. Look at the Pic 18F J series of Microcontrollers.

Microchip has a free TCP/IP Stack. Check their web site. Which C Hi-Tech? Microchips?

In the End You Read a Byte form the SPI Chip, format it and send it to the server.

You do not say what you are calling. If your program is running and can answer the phone, that is the easiest way. X or Y-Modem will be harder. it is hard to get docs for Z-Modem. A TCP/IP Stack will be more difficult. You will need to see if it and your program will fit on the chip.

... snip ...

Huh? Try Omen Technology, at:

They are the originator of zmodem, quite a few years ago.

cbfalconer at maineline dot net

Too late for me now. (About 3 years) still $2000

Go to

formatting link
they have lots of application notes. They have one regarding connecting a PIC to the internet.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required