Read a BCD value (Thumbwheel Switch)


Closed Thread
Results 1 to 13 of 13

Hybrid View

  1. #1
    Join Date
    Dec 2005
    Posts
    8


    Did you find this post helpful? Yes | No

    Question So how would one do this with PORTA on a 16F628?

    I too am a NU B. I understand the coding from Melanies example. But how would I config PORTA 0-3 to read my switch. Seems the option register only controls port B options. I know it is probably uber simple, just eluding me at the time!

    Thanks in advance...

    Shawn

  2. #2
    Join Date
    Dec 2005
    Posts
    8


    Did you find this post helpful? Yes | No

    Wink Arghhhhhh... documentation is da bomb..

    I found my answer!!!

    CMCON and VRCON control the configuration and behavior of PORTA..

    wow.. love these things, learing a lot just flashing LED's

  3. #3


    Did you find this post helpful? Yes | No

    Default

    You also have to use external pull-ups for porta. I believe portb is the only one that has them.

  4. #4
    Join Date
    Dec 2003
    Location
    Wichita KS
    Posts
    511


    Did you find this post helpful? Yes | No

    Default

    Hello KD6OJI,

    What class are you? Extra Class here for decades. have a few Hams around here... some from England, Some from Cal <g>, and some from Kansas. And another in 8 land.

    Dwayne
    Ability to Fly:
    Hurling yourself towards the ground, and missing.

    Engineers that Contribute to flying:
    Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute

    Pilots that are Flying:
    Those who know their limitations, and respect the green side of the grass...

  5. #5
    Join Date
    Dec 2005
    Posts
    8


    Did you find this post helpful? Yes | No

    Talking Thanks!

    External pullups aren't a problem, thats easy.
    just had to figure out HOW to tell port A not to be fancy, just be a lowly input pin.


    As for me, Tech no code since 92.. Living in Dallas TX area now, originally licensed in CA.

Similar Threads

  1. Cleaning up code
    By Tobias in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 2nd December 2009, 07:14
  2. SEROUT WORD variable problem
    By Tobias in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 19th April 2009, 11:20
  3. Q: using MCLR for Input on 12F683
    By picster in forum mel PIC BASIC Pro
    Replies: 46
    Last Post: - 31st January 2009, 15:25
  4. How to read pulse from reed switch
    By passion1 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 9th June 2007, 14:29
  5. Changing declared variables names on the fly
    By jessey in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 16th December 2006, 06:34

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