Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Writing from PIC to non-volatile memory

Status
Not open for further replies.

Savlon

New Member
Hi folks,

Im trying to design my own "black box" recorder for small aircraft, and am going to use a PIC for the data acquisition. I want to use the PIC to convert an analogue i/p into digital form and then store it in some form of solid-state memory device. I havnt used a micro-controller before so this is all new to me.

Could anyone please advise me on how to do this and possibly reccommend a form of memory that would be compatible.

Ta very much... 8)
 
The Analogue to digital converter in the PIC would convert the input to a digital value anyway. This would be stored in a register after the appropriate conversion time (see data sheet for your device). This could then be moved to an internal address of your choosing (again according to the architecture of your device).

I haven't used non-volatile memory for a MCU before (or any external memory for that matter). Could anyone else help with that? :)
 
Thanks for ur reply mark, iv been looking through the datasheet n think i understand the a/d conversion now.

Can anybody help me with writing to memory plz?

Iv been reading about USB interfacing on the microchip web site and it looks pretty scary, has anybody used USB for writing to memory?
Would the USART port be easier to use?
If so could some1 give me some general advice on how to go about using it?

Ta very much... 8)
 
Savlon said:
Iv been reading about USB interfacing on the microchip web site and it looks pretty scary, has anybody used USB for writing to memory?
Would the USART port be easier to use?

The USART would be a great deal easier to use, USB is very over complicated for most uses. The most common suggestion here for using USB is to use a USB-Serial convertor chip - essentially just using serial, so you may as well use a serial port in the first place.

Anyway, this isn't really anything to do with your question!.

The device you are wanting to build is usually called a datalogger, it reads analogue inputs and stores the results in EEPROM (Electrically Eraseable Programmable Read Only Memory). This are usually small 8 pin devices accessed via an I2C bus. A datalogger will normally convert and store analogue readings at a set time interval, then you can transfer the data over a serial link to a PC - or USB if you had the desire to do so.

I've got I2C details in my PIC tutorials at **broken link removed**, using a few different I2C devices, including large memory devices (256kbit = 32KB). If required you can use up to 8 of these devices. My next tutorial will be how to read analogue inputs - I've already got the input board designed.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top