LCD BARgraphs


Closed Thread
Results 1 to 40 of 233

Thread: LCD BARgraphs

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,133


    Did you find this post helpful? Yes | No

    Default

    Currently the 16F877. I have handy also other to try. Maybe a 18F452.

    To be sure that Portb.0 is OK, I tested with a simple loop of the kind:

    while portb.0=1
    wend
    high LED1

    and worked OK. So electrically there is no problem.

    PICDEM2+ is connected to ICD2 working in programmer mode only. So, there is for sure no other source of interference.

    Skimask: could you post the link you mentioned? Thanks

    Ioannis
    Last edited by Ioannis; - 26th June 2007 at 06:57.

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Wink

    Quote Originally Posted by Ioannis View Post

    Skimask: could you post the link you mentioned? Thanks

    Ioannis
    Hi, Ioannis

    There : http://www.picbasic.co.uk/forum/showthread.php?t=6574

    << While trying to develop my project using your interrupts, I stuck on, I think for sure, stupid one. The attached sample code does not respond to PORTB.0 interrupt. Is there any mistake I 've made and can't see? >>

    Thanks to PbP ... TRISB = 255 and led on PORTB.2 will work ...

    BUT does your PORTB.0 change state when button ( ?) pushed ... in other words, is the pullup or pulldown resistor the OTHER side of the Pushbutton ... ( yes, I know it's a really stupid mistake ...but ...)


    have a nice day

    Alain
    Last edited by Acetronics2; - 26th June 2007 at 10:13.
    ************************************************** ***********************
    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 " !!!
    *****************************************

  3. #3
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,133


    Did you find this post helpful? Yes | No

    Default

    Thanks Alain for the link.

    About the portb I did not really understood what you meant.

    I test the portb.0 independently from the Interrupts and when pressed the program really see it. Like that:

    while portb.0=1
    wend
    high led1

    If button on Portb.0 is NOT pressed the program loops in the While-wend. If pressed then the LED1 lights, showing that there is no problem in the Setup or connections.

    But when trying the Interrupts nothing happens. Really annoying...

    Ioannis

  4. #4
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Talking

    Hi,

    For Portb.1 ...

    you've declared it as an Input ... and drive a led with it ... so, it's an OUTPUT !!!

    ...

    I think the Interrupt problem could be here ... I remember a thread explainining a Change in the I/Os disabled the Pullups ...

    YESS it is !!! ... just over Fig 3.3 of the Datasheet ...

    Tadaaaaaaa ..... one RTFM for you !!!

    Alain
    ************************************************** ***********************
    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 " !!!
    *****************************************

  5. #5
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,133


    Did you find this post helpful? Yes | No

    Default

    The LED is on portb.2. Portb is set as all outputs except bit 1. See the trisb=1

    So, where is the ... Tadaaa?? :-)

    Ioannis
    Last edited by Ioannis; - 26th June 2007 at 12:06.

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Ioannis View Post
    The LED is on portb.2. Portb is set as all outputs except bit 1. See the trisb=1

    So, where is the ... Tadaaa?? :-)

    Ioannis

    No tadaaaaaa ... just read a bit too quickly ( TRISx = %00000001 is so much easier to look at ...)

    Strange ... i tried DT interrupts quite the same way ... no problems.
    Last edited by Acetronics2; - 26th June 2007 at 12:36.
    ************************************************** ***********************
    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
    Nov 2003
    Location
    Greece
    Posts
    4,133


    Did you find this post helpful? Yes | No

    Default

    I think I am,

    trisb=1 is equal to:

    trisb=%00000001

    Isn't this bit 0 of port b set as input?

    Ioannis

Similar Threads

  1. Is this code not initialising the LCD properly?
    By Platypus in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 30th January 2010, 19:14
  2. 16f688 LCD what have I done wrong
    By spitfiredriver in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 8th August 2009, 19:54
  3. Play with LCD on PICDEM
    By The IceMan in forum mel PIC BASIC
    Replies: 5
    Last Post: - 22nd August 2008, 16:56
  4. Need help with LCD number display.
    By Steve Matson in forum mel PIC BASIC
    Replies: 8
    Last Post: - 26th June 2007, 23:07
  5. LCD will not start
    By btaylor in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 24th May 2007, 02:30

Members who have read this thread : 2

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