Thread: Hey , I need some help .

  1. #1
    Registered User
    Join Date
    Jan 2012
    Posts
    12

    Hey , I need some help .

    I'm having trouble . I couldn't figure out how to write a program to use temperature sensor to give out 3 different kinds of voltage to a motor . Could anyone guide me in this ? By the way , I'm using PIC18F4550 microchip in it .

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    There's not much chance of that without say a circuit diagram showing how your sensors and motor are wired to your PIC.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Jan 2012
    Posts
    12
    The circuits are basic type . Normal temperature sensor circuit and DC motor circuit .

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    Oh that's a relief then

    For a moment, I thought you had the sensor wired to pin2 rather than pin1
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  5. #5
    Registered User
    Join Date
    May 2010
    Posts
    4,633
    Shouldn't that sensor be on pin 3?

  6. #6
    Registered User
    Join Date
    Jan 2012
    Posts
    12
    So how should I write the program ?

  7. #7
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    Well we could spend a few more days trying to tease every small fact about the problem using this method

    Or you could read this and provide us with a decent amount of usable information about what you're actually using, what you're actually stuck on and what you've actually tried so far.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  8. #8
    - - - - - - - - oogabooga's Avatar
    Join Date
    Jan 2008
    Posts
    2,808
    Quote Originally Posted by Jun Wei Foo View Post
    So how should I write the program ?
    THIS is an example of a troll.
    Or an idiot.
    (A fine line.)
    The cost of software maintenance increases with the square of the programmer's creativity. - Robert D. Bliss

  9. #9
    Registered User
    Join Date
    Jan 2012
    Posts
    12
    I'm trying my best dude . There's no need for sarcastic remarks .
    Quote Originally Posted by oogabooga View Post
    THIS is an example of a troll.
    Or an idiot.
    (A fine line.)

  10. #10
    Registered User
    Join Date
    Jan 2012
    Posts
    12
    I'm only stuck with writing the part whereas the temperature sensor can give me the temperature or data for me to use it .

    Quote Originally Posted by Salem View Post
    Well we could spend a few more days trying to tease every small fact about the problem using this method

    Or you could read this and provide us with a decent amount of usable information about what you're actually using, what you're actually stuck on and what you've actually tried so far.

  11. #11
    Registered User
    Join Date
    May 2010
    Posts
    4,633
    You are using nonstandard hardware, how are we to know how your sensors are connected to your board? You need to show us how your sensor is connected to your PIC (a schematic) , what kind of output your sensor provides. Also provide information as to who manufactured the sensor, along with model number. How manufactured the processor board and its model number would also be helpful. What compiler are you using?

    Jim

  12. #12
    Registered User
    Join Date
    Jan 2012
    Posts
    12
    I'm using MCC18 compiler . Is it possible for me to post the picture of my sensor and all here for you to see ? Cause some part of it , I'm not too sure of it .
    Quote Originally Posted by jimblumberg View Post
    You are using nonstandard hardware, how are we to know how your sensors are connected to your board? You need to show us how your sensor is connected to your PIC (a schematic) , what kind of output your sensor provides. Also provide information as to who manufactured the sensor, along with model number. How manufactured the processor board and its model number would also be helpful. What compiler are you using?

    Jim

  13. #13
    Registered User
    Join Date
    Jan 2012
    Posts
    12
    ImageShack® - Online Photo and Video Hosting
    ImageShack® - Online Photo and Video Hosting
    Anyway I will be connecting the temperature sensor to portb .

  14. #14
    Registered User
    Join Date
    Jan 2012
    Posts
    12
    schematic_MCT_board.pdf
    this is the schematic of the PIC I'm using .

  15. #15
    Registered User
    Join Date
    May 2010
    Posts
    4,633
    If you don't know what the hardware specifications are, you need to contact whoever gave you this project. Since you don't even seem to know the difference between C and C++ I doubt you will get very far with this project without serious hand holding. Good Luck.

Popular pages Recent additions subscribe to a feed