pot command


Closed Thread
Results 1 to 23 of 23

Thread: pot command

Hybrid View

  1. #1
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    yes thats what I am beginning to realize too , lots of stuff missing in the book, then when you use another chip, I'm screwed.
    Abou tthe A/D, doesn't that read a voltage ? whereas the Pot read a resistance ?

  2. #2
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    both cde works,
    i am trying to figure out one thing now.

    I am replacing this command line:
    HIGH PORTB.0
    PAUSE 1000
    LOW PORTB.0

    by this one:
    serout 2,n9600,(2)

    i am getting errors:
    C:\PBP\POT_TRY.BAS ERROR Line 39: Bad expression.
    C:\PBP\POT_TRY.BAS ERROR Line 33: ID LED2 is not a LABEL.
    C:\PBP\POT_TRY.BAS ERROR Line 34: ID LED3 is not a LABEL.
    C:\PBP\POT_TRY.BAS ERROR Line 35: ID LED4 is not a LABEL.

    suddenly my labels are not labels ??

  3. #3
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default

    Sometimes the error messages bear no relation to the actual error.

    Try changing serout 2,n9600,(2)

    to serout 2,n9600,[2]
    Keith

    www.diyha.co.uk
    www.kat5.tv

  4. #4
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    yes thanks,

    those french keyboards...

    k

  5. #5
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    yeah i know what you mean. It's always handy to have English(United State) driver installed too. Just need to press Shift+Alt to switch between language
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  6. #6
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,651


    Did you find this post helpful? Yes | No

    Talking

    Quote Originally Posted by lerameur
    yes thanks,

    those french keyboards...

    k
    Hi,

    For once one can say it's the Keyboard's error ...

    Mhhhh, have something against French Goose liver, Sauternes, Camembert, Cognac, ... and so on ...

    Ahhhh, I see ... that was just a "glitch" ...

    Alain

    PS: In French, as I've read here, your should be called " Le Ramier " ... and not "Lerameur" ....
    LOL !!!!
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  7. #7
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    wow shift-alt, thats cool.

    I am still confused about one part. The default selection from the compiler is great but very specific for me. Lets say you are using the Pic16F877, with port A, B, C,D,
    I then use the command serout, IS there a problem using the exact port?
    Ex: serout portC.2,N9600,[3]
    instead of 2,N9600,[3] . ( by which I know the pin number, but I dont know the port)
    For me it looks like its taking a random port, obviously , the one by default...

    ken

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


    Did you find this post helpful? Yes | No

    Default It's better

    Quote Originally Posted by lerameur
    wow shift-alt, thats cool.

    I am still confused about one part. The default selection from the compiler is great but very specific for me. Lets say you are using the Pic16F877, with port A, B, C,D,
    I then use the command serout, IS there a problem using the exact port?
    Ex: serout portC.2,N9600,[3]
    instead of 2,N9600,[3] . ( by which I know the pin number, but I dont know the port)
    For me it looks like its taking a random port, obviously , the one by default...

    ken
    Hi Ken,
    No it's better to specify PortA or PortB or . . . than just serout 2,N9600. I have only seen serout 2,N9600 used as port B, I think it is a throwback to PBasic and not the pro that still works in Pro,maybe for basic stamps, the PBasic cannot use the Pro sytax which allows you to specify the port. I only use the full name of ports so I do not allow myself to get sloppy, I am not a good enough programmer to ALLOW sloppy, I think generally speaking you can serout on any "I/O" pin which can be made digital, possible exception A.4 or 5 and IT may work with ext. pullup.
    Joe

Similar Threads

  1. Active low input?
    By CosMecc in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 8th August 2010, 20:31
  2. Using the Pot command.
    By timseven in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 17th August 2009, 20:23
  3. PBP2.50b and POT command problem ?
    By RFsolution in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 13th October 2008, 17:14
  4. Replies: 4
    Last Post: - 24th January 2007, 22:20
  5. Can I do this???
    By noobie in forum mel PIC BASIC
    Replies: 2
    Last Post: - 10th June 2006, 18:57

Members who have read this thread : 0

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