Help - Microcontroller Programming

Discussion in 'Embedded Systems and Microcontrollers' started by rling, Apr 3, 2009.

  1. rling

    Thread Starter New Member

    Apr 3, 2009
    5
    0
    1.) I have two sensors:

    a) Force Sensor
    b) Accelerometer

    2.) I am using PIC16f877.

    3.) I am using Kc Wirefree Bluetooth module.

    My project is to ADC the sensors' signal in the PIC16f877. Later transmit the signals through Kc Wirefree Bluetooth module. Data acquisition is done real time in the LabView (PC).

    I have no knowledge in Programming a PIC. May anyone here kindly help me with the programming code.

    Any example(s) available?

    **urgent**

    Thank you.
     
    Last edited: Apr 3, 2009
  2. mik3

    Senior Member

    Feb 4, 2008
    4,846
    63
    What programming language are you going to use and which compiler?
     
  3. rling

    Thread Starter New Member

    Apr 3, 2009
    5
    0
    C language.
     
  4. mik3

    Senior Member

    Feb 4, 2008
    4,846
    63
  5. russ_hensel

    Well-Known Member

    Jan 11, 2009
    818
    47
    by the time you are done you will know a fair amount of C for the PIC
     
  6. rling

    Thread Starter New Member

    Apr 3, 2009
    5
    0
    I have roughly done a quick search by keywords. I couldn't find any.

    Is there any relevant example in the forum?
     
  7. rling

    Thread Starter New Member

    Apr 3, 2009
    5
    0
  8. maxpower097

    Well-Known Member

    Feb 20, 2009
    795
    388
    When I first started I got the VTC 2007 C video's. These did a great job of teaching me the basics where I could at least see what was going on.
     
  9. rling

    Thread Starter New Member

    Apr 3, 2009
    5
    0
    No example code around?


    I don't have much time to learn from the basic. :(


    Just hoping to get my project done as sooner as possible. :(
     
  10. mik3

    Senior Member

    Feb 4, 2008
    4,846
    63
  11. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    Since you have 'urgent' listed, I'm wondering what the timeframe is.

    If you know a programming language already, I'd guess about 2 weeks if you are a quick learner and devote most of every day to it.

    Otherwise about a month or more to have everything going, again, if you are a quick learner.

    There is a LOT of information to digest that won't fit in a single post, to the point I don't quite know where to start.

    I'd suggest finding some "Introduction to PIC Programming" information, ,in C, which should get you to y our "Hello World" program running, and understanding how it works in about 1 day. From there, other projects, such as mik3's Spectrum Analyzer will make sense. Some of the things microcontrollers do/how they respond is sometimes non-intuitive for a few people. Trying to do it too fast will result mostly in frustration.

    Start simple, and work up to your complete project, one function at a time, e.g. start with the serial read/write, the PicKit 2 programmer is also a serial debugger, so that might be a good area to start, since feedback is quickly available. Use blinking LED's for output, once you have the accelerometer routines worked out to change LEDs, set up the comms for it to communicate to the bluetooth module.

    The PicKit 2 starter kit ($50), has 12 example programs, for ADC, serial, LEDs etc, included, which should give you a jumpstart. They are written in Microchip C18.
     
Loading...