EmbeddedRelated.com
Forums

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

Started by JB June 1, 2007
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!

I should mention I am coding in C

JB wrote:
> 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?
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
On Jun 2, 9:35 am, Andreas Koch <nos...@kochandreas.com> wrote:
> JB wrote: > > 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? > > 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.
JB wrote:

> 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)
"JB" <john.bradshaw@niccolo.ltd.uk> wrote in message 
news:1180841699.543752.87210@q66g2000hsg.googlegroups.com...
> On Jun 2, 9:35 am, Andreas Koch <nos...@kochandreas.com> wrote: >> JB wrote: >> > 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? >> >> 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.
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 http://www.fivetrees.com
On Jun 3, 3:01 pm, "Steve at fivetrees" <s...@NOSPAMTAfivetrees.com>
wrote:
> "JB" <john.brads...@niccolo.ltd.uk> wrote in message > > news:1180841699.543752.87210@q66g2000hsg.googlegroups.com... > > > > > On Jun 2, 9:35 am, Andreas Koch <nos...@kochandreas.com> wrote: > >> JB wrote: > >> > 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? > > >> 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. > > 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. > > Stevehttp://www.fivetrees.com
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! : (
On Jun 3, 3:01 pm, "Steve at fivetrees" <s...@NOSPAMTAfivetrees.com>
wrote:
> "JB" <john.brads...@niccolo.ltd.uk> wrote in message > > news:1180841699.543752.87210@q66g2000hsg.googlegroups.com... > > > > > On Jun 2, 9:35 am, Andreas Koch <nos...@kochandreas.com> wrote: > >> JB wrote: > >> > 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? > > >> 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. > > 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. > > Stevehttp://www.fivetrees.com
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! : (
On Jun 1, 9:32 pm, JB <john.brads...@niccolo.ltd.uk> wrote:
> 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!
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.
JB wrote:
> On Jun 3, 3:01 pm, "Steve at fivetrees" <s...@NOSPAMTAfivetrees.com> > wrote: >> "JB" <john.brads...@niccolo.ltd.uk> wrote in message >> >> news:1180841699.543752.87210@q66g2000hsg.googlegroups.com... >> >> >> >>> On Jun 2, 9:35 am, Andreas Koch <nos...@kochandreas.com> wrote: >>>> JB wrote: >>>>> 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? >>>> 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. >> 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. >> >> Stevehttp://www.fivetrees.com > > 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! : > ( >
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.