Who can help me checking my Programming


Closed Thread
Results 1 to 26 of 26

Hybrid View

  1. #1
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    baud con N2400
    Won't work... A constant is a numeric value. N2400 may have a numeric value associated with it, but N2400 itself is not a numeric value.

    You've got DEBUG defined as PortC.6, and SEROUT going to the same place.
    Which one is it?

    SEROUT PORTC.6,baud, [#B0=0]
    #B0=0? What's that for? The manual doesn't have anything like that in it...

    How about some of this:
    Code:
    include"modedefs.bas"
    DEFINE LCD_DREG PORTB
    DEFINE LCD_DBIT 4
    DEFINE LCD_RSREG PORTB
    DEFINE LCD_RSBIT 0
    DEFINE LCD_EREG PORTB
    DEFINE LCD_EBIT 1
    DEFINE LCD_BITS 4
    DEFINE LCD_LINES 2
    DEFINE LCD_COMMANDUS 2000
    DEFINE LCD_DATAUS 50
    DEFINE OSC 4
    DEFINE ADC_BITS 8 
    DEFINE ADC_CLOCK 3 
    DEFINE ADC_SAMPLEUS 50
    trisa = $ff : trisc = 0 : b0 var byte : pause 2000
    LCDOUT 254 , 1 , "   WELCOME MY   " , 254 , 192 , 2 , " MONITOR SYSTEM "
    pause 3000 : LCDOUT 254 , 1 , "  MY STARTING   " , 254 , 192 , "TEMP IS: "
    TRISA = 255 : TRISC.6 = 0 : TRISD = 0 : TRISA.0 = 1 : B0 VAR BYTE
    MAIN:    ADCON1 = 3 : ADCIN 0 , B0 : lcdout 254, 201, "<"
    if b0 = 0 then lcdout 254, 201, " "
    lcdout 254, 202, DEC ( b0 ) , "'C" : serout portc.6, n2400, #b0
    pause 5000 : goto main
    END
    Lots of colons, shorter, easier to read in my mind...yes...Your job to figure out what's different. It's all in the manual.
    But the main thing is...
    We've got no idea which PIC you're using, which version of PBP, no idea what the problem is that you are having (although I can guess by looking at your code), no idea what your circuit actually looks like...

  2. #2
    Join Date
    Jan 2008
    Posts
    28


    Did you find this post helpful? Yes | No

    Default

    hello i using PIC 16F877A and the B0 is the ADC after convert and i also using the temperature sensor to detect the temperature and every 5s i want the lcd show out my result at the same time i also need to send out the result to host bluetooth on pc at there also will show out the same result....so what should i do it............!i hope u all can help me....urgent..........!!! thanks a lot ..........!!!!

  3. #3
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by slimpeng View Post
    hello i using PIC 16F877A and the B0 is the ADC after convert and i also using the temperature sensor to detect the temperature and every 5s i want the lcd show out my result at the same time i also need to send out the result to host bluetooth on pc at there also will show out the same result....so what should i do it............!i hope u all can help me....urgent..........!!! thanks a lot ..........!!!!
    Did you see Post #2?

    Do you want the program written FOR you, hardware built FOR you, hand delivered TO you? Tomorrow?

    The program in Post #2 is practically written FOR YOUR PARTICULAR APPLICATION! HELLO!!! Anybody Home!!! McFLY!!!
    That is of course IF your hardware is set up right. And another thing, we'd need to know what kind of temperature sensor you're using...
    Is it a DS1820 type thing?
    A Alumel/Chromel thermocouple pair connected to an op-amp?
    A handheld infrared laser detector with an analog output?
    An ape slapping a stick on the ground with a candle at his feet, the hotter his feet, the harder he slaps the ground, the ground is a pressure sensitive resistor tied to a voltage divider network?)

    Heck, I even put a 5 second delay in there.

    Do you want the PC code and Bluetooth interface code written too?

    If it's that urgent, why didn't you get it done earlier?
    'school project' gone bad?
    Maybe you can pay somebody to do it for you...oh...wait...I think I already did. Where's my money?


    I'm out...
    Last edited by skimask; - 17th January 2008 at 05:20.

  4. #4
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Hi slimpeng,
    to start off with, replace baud con N2400, with baud con 4 , that will give you mode 4 which is N2400. You have several sub directories which output set temps, which the IF then loop will only address if the B0 variable exactly matches the number. what if the number is 11 or 19? the loop misses and goes around again, unless you do an AND less than type statement, I am curious as to why not lose all those subdirectories and output the actual B0 variable if it holds the accurate temp.something like:
    Code:
    loop:
     LCDOUT 254,201,"The Temp is"#B0 'or
     SEROUT PORTC.6,BAUD, ["The Temp is",#B0] 
    goto main
    HTH
    JS
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  5. #5
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    Do you want the program written FOR you, hardware built FOR you, hand
    delivered TO you? Tomorrow?

    The program in Post #2 is practically written FOR YOUR PARTICULAR APPLICATION!
    HELLO!!! Anybody Home!!! McFLY!!!
    Frustration-Aggression Theory:

    Frustration is a feeling of tension that occurs when our
    efforts to reach some goal are blocked. When this occurs,
    it can produce feelings of anger, which in turn can generate
    feelings of aggression and aggressive behavior. This theory
    has been utilized to explain a lot of violent behavior over
    time. For example, some have stated that people who become
    frustrated with their jobs because they don't like their work,
    can't get the raise they want, etc., but can't take out their
    aggressions at work (can't yell at the boss, can't punch
    annoying co-workers), will redirect this frustration and act
    aggressively toward others.



    Jeremy,

    If you don't have any patience, do not participate in this forum!

    Best regards,

    Luciano

  6. #6
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Luciano View Post
    Jeremy,
    If you don't have any patience, do not participate in this forum!
    Best regards,
    Luciano
    Holy crap...
    I've got loads of patience, LOADS I tell ya, hours and hours of it, sitting around waiting to be used...
    But, again, holy crap, when the answer, or at least a fairly decent chunk of an answer is sitting right there...RIGHT THERE in front of a person...I mean, jeez, how much more prompting does a person need to get off their rear end and try to figure something out.

  7. #7
    Join Date
    Jan 2008
    Posts
    28


    Did you find this post helpful? Yes | No

    Default

    Now i attach my circuit diagram...for u all see so the progrmming can running this circuit or not....
    Attached Images Attached Images  

  8. #8
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by slimpeng View Post
    Now i attach my circuit diagram...for u all see so the progrmming can running this circuit or not....
    'bout time.
    Check your other thread...

  9. #9
    Join Date
    Nov 2007
    Location
    West Covina, CA
    Posts
    219


    Did you find this post helpful? Yes | No

    Thumbs down Dude! Take a chill pill! Better yet a sabbatical...

    Quote Originally Posted by skimask View Post
    Holy crap...
    I've got loads of patience, LOADS I tell ya, hours and hours of it, sitting around waiting to be used...
    But, again, holy crap, when the answer, or at least a fairly decent chunk of an answer is sitting right there...RIGHT THERE in front of a person...I mean, jeez, how much more prompting does a person need to get off their rear end and try to figure something out.
    I'm probably not the only one that hesitates asking a simple question for fear of getting a verbal lashing for reading and not understanding the information provided either in responses or the data sheets. Or having to have our project pre-approved by you before making a suggestion. In my searches to my questions through out this forum, to keep from "bothering the experts", I found that one thing is evident, it's not the year 2004 when there seemed to be an eagerness to "help" upcoming PBP users. Your definition of patience is warped and unfortunately it seems to me that some of the other "experts" are getting tired too.
    If you feel your forehead forming a scowl as you read someones annoying and dumb question, do us a favor... don't respond. Because a lot of us are not at the same experience level you are and don't need the added aggrevation that comes with learning something new.
    My two cents.

  10. #10
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by LinkMTech View Post
    I'm probably not the only one that hesitates asking a simple question for fear of getting a verbal lashing for reading and not understanding the information provided either in responses or the data sheets.
    Big difference between trying to 'read and understand the information'...and not having done squat to help yourself.

    Or having to have our project pre-approved by you before making a suggestion.
    Hey, I'm a choad like the rest of the shmucks around here, I know, they know it...Dig it...

    Your definition of patience is warped and unfortunately it seems to me that some of the other "experts" are getting tired too.
    I just might be able to draw a bit of a conclusion there...Ya think?

    If you feel your forehead forming a scowl
    Scowl? No... Roll of the eyes? Maybe... Laughter? Ok, I'll buy that one.

    do us a favor... don't respond.
    Too late...

    Because a lot of us are not at the same experience level you are and don't need the added aggrevation that comes with learning something new.
    Guess how I got that much experience?
    There wasn't much for forums back then...

    My two cents.
    Taken...

Similar Threads

  1. Data Programming Error at 0000
    By cpatnoi in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 22nd May 2009, 03:37
  2. Problems programming
    By Lionheart in forum General
    Replies: 4
    Last Post: - 7th December 2008, 16:51
  3. PIC programming algorithm - where is it to find?
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 24th June 2007, 18:31
  4. Some questions for programming
    By fnovau in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 5th July 2006, 16:04
  5. MELab Programming
    By tarr in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 22nd March 2006, 13:36

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts