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.

Displaying an Accelerometer

Status
Not open for further replies.

Ateevg

New Member
I have been doing some research and the PIC18f452 and the PIC16F818 seem to be what I need. I want to take any 3 axis accelerometer and display the g's on an lcd display. With a reset button on the ADC so when I mount this device and it is at a slight angle the xyz axis will be at 1 g. Any help that you guys can give me would be loved and I'm not to sure about the micro controllers at the top
 
You're being a bit vague so we aren't exactly sure what it is you want from us.
 
Really I all I have is the 3 axis accelerometer DE-ACCM3D2. From their I need an analogue to digital converter so I can put it to a lcd screen
 
Any PIC with a 3-channel ADC will do the trick. Doesn't really matter. To set up the ADC in a PIC read the datasheet. But the basic steps are like this:

1. In the register that controls which pins are inputs or outputs configure the ADC pins as inputs
2. In the register that controls which pins are digital or analog configure the ADC pins as analog
3. In the register that controls which pins the ADC will be enabled on, enable the ADC channels
4. Configure the ADC with the other ADC registers for things like sampling method, sampling time, clock source, etc.
5. Set the register to initiate samples on the right ADC channel to trigger a conversion. This varies depending on the features involved, like manual or auto-sample, auto-sequencing through channels, and things like that.
 
Last edited:
ok, I have already looked into some of the programmers and programming software for those pic. Do you guys have any thoughts?
 
Just use the MPLAB IDE and the Student Version of C18, both from Microchip, which are both free to program in C. If you are just starting out (like if you don't already know something about PIC16) I would go straight to a PIC18 and skip over PIC16 because it seems to have improved coding structure in assembler and C so it's easier to work.

A good cheap programmer is the PICKit 2 from Microchip which is like $50. There are also clones as well.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top