PBP & 16F690 bug?


Closed Thread
Results 1 to 10 of 10

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    Sorry i just edited above... ANSELH=0
    Steve

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

  2. #2
    Join Date
    Sep 2003
    Location
    Vermont
    Posts
    373


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mister_e
    Sorry i just edited above... ANSELH=0
    I did ANSEL, not ANSELH. Why would the pin revert to a 0/input when invoking shiftout even if ANSELH is high?

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


    Did you find this post helpful? Yes | No

    Default

    As they are analog by default, i guess it's one of those weird thing it could do. But Why B.5 when the Clock signal apear on B.6.... because of the combination of the external load, Capacitance, TRIS switching AND internal A/D multiplexer i guess... i didn't spend too much time in the datasheet to study how it could happen but if the ANSELH is not cleared, those pin will certainely be analog, not digital as you want.

    You know, sometimes it's better to don't know all the reasons and stay happy when it works

    It's just weird that they didn't place the ANSEL and ANSELH register in the A/D datasheet section...
    Steve

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

  4. #4
    Join Date
    Sep 2003
    Location
    Vermont
    Posts
    373


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mister_e
    As they are analog by default, i guess it's one of those weird thing it could do. But Why B.5 when the Clock signal apear on B.6.... because of the combination of the external load, Capacitance, TRIS switching AND internal A/D multiplexer i guess... i didn't spend too much time in the datasheet to study how it could happen but if the ANSELH is not cleared, those pin will certainely be analog, not digital as you want.

    You know, sometimes it's better to don't know all the reasons and stay happy when it works

    It's just weird that they didn't place the ANSEL and ANSELH register in the A/D datasheet section...
    Thanks, I'll try the fix tonight. Wierd quirk though...Huh?

  5. #5
    Join Date
    Sep 2003
    Location
    Vermont
    Posts
    373


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mister_e
    As they are analog by default, i guess it's one of those weird thing it could do. But Why B.5 when the Clock signal apear on B.6.... because of the combination of the external load, Capacitance, TRIS switching AND internal A/D multiplexer i guess... i didn't spend too much time in the datasheet to study how it could happen but if the ANSELH is not cleared, those pin will certainely be analog, not digital as you want.

    You know, sometimes it's better to don't know all the reasons and stay happy when it works

    It's just weird that they didn't place the ANSEL and ANSELH register in the A/D datasheet section...
    I cleared the ANSELH register to 0 and all is right with the world...Thanks for the help.

    Ron

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


    Did you find this post helpful? Yes | No

    Default

    Great to know it's working. It's not often i saw TWO ANSEL registers so.. kinda interesting to know it exist
    Steve

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

  7. #7
    Join Date
    Sep 2003
    Location
    Vermont
    Posts
    373


    Did you find this post helpful? Yes | No

    Exclamation

    An interesting aside to this saga. Jeff from Melabs emailed me back about this quirk. This is important for anyone using Analog inputs with digital outputs. When the uP is commanded to change a bit, it reads, modify,writes the entire port. Since Analog bits are read as zero, when the port is rewritten, any Analog bit will be written as a zero. Even if it was used as a digital high output,as was in my case. Verrrry interesting!

    Ron

Similar Threads

  1. PBP Book
    By Bruce in forum Off Topic
    Replies: 83
    Last Post: - 4th October 2021, 12:55
  2. pbp bug or incompetence?
    By George in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 27th June 2008, 23:33
  3. BUG IN PBP 2.50 & 2.50A pic16F688 ??
    By FRANCISCOGIM in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 12th June 2008, 02:42
  4. PBP bug ???
    By boban in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 19th March 2008, 16:30
  5. Compiler differences between PBP 2.33 & 2.46
    By nikopolis in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 2nd May 2006, 19:01

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