Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have AVR(or any, doesn't matter) microcontroller and 1 Megabyte SPI flash IC that I want to write to, I can do it already, have no problems with communication between these two. But so far I write to chip directly from microcontroller, basically I write data to the uC and then I write it to the flash with uC. Microcontrollers do not have big memory inside them, so this method is only good for very small data.
What should I do if I want for example write 1 Mb of data(from PC)?
I mean I have ideas how to do it with some kind of USART or with FTDI chip, but I wonder what is the right/efficient way of doing it?

share|improve this question
    
Have you tried using a ring buffer yet? – Ignacio Vazquez-Abrams Aug 12 '15 at 1:21
    
You mean ring buffer with UART? I was thinking about it, but I wonder if that's the right way. Probably that's the easiest way, yes, but seems too easy. And I guess it will take a lot of time for big chunks of data. – ScienceSamovar Aug 12 '15 at 1:27

You can just use xmodem or any other file transfer protocol. For hardware you can use any working usb -> RS232 converter (don't forget to have TTL level one, otherwise you have to use MAX232 to convert +-12V signals to TTL level).

For example, here you can find simple example of xmodem protocol.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.