Take it from a big dummy - CHECK YOUR SPECIAL REGISTER SETTINGS!


Closed Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2012
    Location
    Grid EN19MV
    Posts
    159

    Default Take it from a big dummy - CHECK YOUR SPECIAL REGISTER SETTINGS!

    Ok, wow, do I feel stupid now.

    About 10 or so days ago, I posted THIS THREAD because I was beating my head against the wall trying to get an interrupt to work.

    Since then, every evening, I have tried something else, and tonight, I finally got it.

    All along, I was using PORTB.0 to trigger part of the program - I had PORTB defined as all digital. I had PORTB.0 defined as an input. I turned on PORTB change of state interrupt, I enabled the interrupt on PORTB.0. I turned on the weak pullup for PORTB.0. But in the OPTION register, I specifically was TURNING OFF PORTB PULLUPS!

    I didn't look at the datasheet "because I've done this a bunch of times - OPTION.7 = 1 is PORTB pullups on"

    AAGGGHHHH! OPTION.7 = 1 is pullups OFF! No wonder it wasn't working!

    So, I guess the moral of the story is, if you're sure it should work, go over those darned special function register settings again, and save yourself a headache

    <RANT MODE OFF>
    "I have noticed that even those who assert that everything is predestined and that
    we can change nothing about it still look both ways before they cross the street"


    -Stephen Hawking

  2. #2
    Join Date
    May 2007
    Posts
    604


    Did you find this post helpful? Yes | No

    Default Re: Take it from a big dummy - CHECK YOUR SPECIAL REGISTER SETTINGS!

    When working with microcontrollers, an intimate knowledge of the hardware is absolutely essential (know the entire data sheet and/or user/reference manuals like the back of your hand) to get the most out of it. If you have that, then you can work with just about any microcontroller (and development system) to get the most effective solution to the project at hand. Without it, however, no software development system will help (no matter how good or how easy it is to use) as you have found out.
    Why pay for overpriced toys when you can have
    professional grade tools for FREE!!!

Similar Threads

  1. Big Digits on 4x20 LCD
    By Heckler in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 1st March 2014, 23:18
  2. Dummy needs LCD tutorial,
    By TK5EP in forum mel PIC BASIC Pro
    Replies: 32
    Last Post: - 19th April 2011, 09:11
  3. PIC16F886 Register Settings
    By aherrera in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 29th July 2009, 17:52
  4. Dummy Needs help with 12f675
    By IronPenguin in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 19th February 2008, 01:21
  5. Register Settings
    By Archangel in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 26th September 2007, 00:28

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