Rb1 Problem On A 16f819..


Closed Thread
Results 1 to 3 of 3
  1. #1
    Calco's Avatar
    Calco Guest

    Default Rb1 Problem On A 16f819..

    Hi,

    Im having troubles with a 16F819, primarily with RB1.
    What Iam trying to do to save I/O is use a bicolour LED with one end referenced to 2.5v and the other end tied to the PIC's output pin.
    This setup works perfectly for RB0, RB2 & RB3 but not for RB1.

    I can however get the 4 LED's to change if i do something like

    portb=$FF followed by portb= $00

    with a 500ms pause between them they merrily flash red and green all day.

    Ive run through the datasheet a few times and it is still baffling me.

    Anyone else had this problem?

    Any thoughts?

    Regards

    Darryl..

  2. #2
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    I can't replicate your problem...

    Two Resistors 330R each in series between Vdd and Vss (not exactly power-saving - but who cares...). The junction of which has a bi-colour LED nailed to it, the other end of the LED is glued to PortB.1

    Example...

    LedOne var PortB.1
    .. ..

    MainLoop:
    Toggle LedOne
    Pause 10
    Goto MainLoop

    change the pause time for quicker or slower effect... from blink Red/Green to 'continuous' Orange.

    Melanie

  3. #3
    Calco's Avatar
    Calco Guest


    Did you find this post helpful? Yes | No

    Default

    Hi Melanie,

    I'll give that a try. I did manage to make it function (hit the deadline!!) but it was very badly constructed programming.

    Basically I added 1 to the value (x) for port 1
    2 for port 2, 4 for port 3 etc. at the end I simply used Portb=x

    This worked fine.

    Still didnt solve the odd behaviour of rb1.

    I did notice on the datasheet that rb1's output pin is internally different to rb0,2 & 3 though perhaps that has something to do with it.

    Thanks anyway

    Regards

    Darryl..

Similar Threads

  1. self diagnostic problem 16F819
    By wilfrieds in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 11th October 2007, 16:11
  2. USART Problem , but don't know where, in pc? or in PIC?
    By precision in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 15th July 2007, 08:12
  3. Pulsin 16F819 problem
    By rekcahlaer in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 11th April 2007, 13:52
  4. Serin Problem 16f819
    By jjohannson in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 22nd March 2007, 22:50
  5. PIC 16F819 Turn-On Problem
    By Dick Ivers in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 13th September 2005, 22:12

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