Stupid simple question.....


Closed Thread
Results 1 to 19 of 19

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,612


    Did you find this post helpful? Yes | No

    Default

    Nah, if you look at section 9.1 of the mid-range manual you'll find the following:
    All write operations (such as BSF and BCF instructions) are read-modify-write operations. Therefore a write to a port implies that the port pins are read, this value is modified, and then written to the port data latch.
    So I'll stick to my theory ;-)

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


    Did you find this post helpful? Yes | No

    Talking

    Ok Henrik ...

    One red tomato for me ... ( was the question ...)

    this also explains why it acts the same whith heavy capacitive loads ... driving directly Big Mosfets gates i.e.

    Alain

    PS: but what an Idea µChip had to proceed like that ???
    Last edited by Acetronics2; - 23rd February 2010 at 08:46.
    ************************************************** ***********************
    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
    Jun 2008
    Posts
    16


    Did you find this post helpful? Yes | No

    Default

    Why is it that when I enter:

    GPIO = %11111111

    Picbasic says "Undefined variable"?
    www.theLanguageBear.com - Multi-Lingual books for kids and adults of all skill levels.

  4. #4
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,612


    Did you find this post helpful? Yes | No

    Default

    Hi,
    Because the variable GPIO isn't defined....

    This is because you're using PBC and it doesn't provide a way to directly write to the registers as you're trying to do - only PBP does that. As I wrote in my previous message you need to do as Darrel showed you earlier in the thread:
    Code:
    SYMBOL GPIO = $05     '$05 is derived from the memory map in the datasheet for 12F683
    SYMBOL TRISIO = $85
    
    Poke TRISIO, 0   'Set all available GPIO pins as outputs
    Poke GPIO, 255  'All availble GPIO pins high.

  5. #5
    Join Date
    Jun 2008
    Posts
    16


    Did you find this post helpful? Yes | No

    Default

    Cool, thanks.
    www.theLanguageBear.com - Multi-Lingual books for kids and adults of all skill levels.

Similar Threads

  1. Really simple question for you experts :)
    By lew247 in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 4th June 2008, 01:43
  2. SIMPLE question
    By ngeronikolos in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 5th February 2008, 18:27
  3. Stupid question
    By Meriachee in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 20th July 2007, 05:47
  4. really simple, dumb question
    By picster in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 3rd March 2007, 22:02
  5. really simple adcin question
    By kitcat in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 21st April 2006, 09:06

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