Shop OBEX P1 Docs P2 Docs Learn Events
PWM Accelo code? — Parallax Forums

PWM Accelo code?

blondegodblondegod Posts: 1
edited 2008-03-15 23:47 in Robotics
hello im making a balancing robot using a 16f877 pic microcontroller. but uses the parallax 6 pin accelerometer. i dont no how to interface the two. so the pic reads the acccelo then turns on a motor to keep the robot upright.
thing is i am using PIC code ie Mplab

Can anyone help me>?

confused.gifconfused.gifconfused.gifconfused.gif

Post Edited (blondegod) : 3/15/2008 11:11:35 PM GMT

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-03-15 23:47
    This is a support forum for Parallax products. While you're using the Parallax accelerometer, most of what you have to do is specifically PIC related and we won't be able to help much. There are examples in Parallax Basic you can get via a link on the product page in the Parallax webstore.

    You didn't say which accelerometer you're using (dual-axis or tri-axis). The interfaces are completely different. The dual-axis unit puts out variable width pulses on 2 different pins that you have to measure. The tri-axis unit uses an SPI interface that requires 3 I/O pins. You might be able to find other examples for interfacing from a PIC to an SPI interface device on the Microchip website in one of their application notes.
Sign In or Register to comment.