Like Tree2Likes

Hey , I need some help .

This is a discussion on Hey , I need some help . within the C++ Programming forums, part of the General Programming Boards category; I'm having trouble . I couldn't figure out how to write a program to use temperature sensor to give out ...

  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 wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,490
    There's not much chance of that without say a circuit diagram showing how your sensors and motor are wired to your PIC.
    stahta01 likes this.
    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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  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 wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,490
    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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  5. #5
    Registered User
    Join Date
    May 2010
    Posts
    2,702
    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 wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,490
    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.
    jamesallen4u likes this.
    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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  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
    2,702
    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
    2,702
    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.

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21