some days I hate pic's (serout,gsm,usb,f88)


Closed Thread
Results 1 to 6 of 6

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mister_e
    Ok so at least you never opened the PIC16F88 datasheet and discover what's multiplexed on PORTA and if it's enable by default? Right?

    Once done, you'll know why.
    I read the picbasic manual instead, it said if thou use that pin for serial, it shalt do serial.

    Which it does, but just not as efficiently, and only to some devices...........


    If I set the port pin high with a high command, I get the same voltage on the pin as any other I set high, I dont have to worry about whats multiplexed on it / other uses it has, so why should the serout command not set everything up also?

    In the manual little notes are included about other pic's with ''odd'' behaviour so I just presumed this had none to worry about.

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    it's not odd or curious.. it's normal. You're working with digital signal on analog by default I/o.

    Open the PIC16F88 datasheet and discover the Analog section... section 12.0 and 13.0.

    Now you need to disable the analog stuff
    section 12.0 register 12-1 ANSEL:
    ANSEL=0 ' set all related i/o to digital mode

    Section 13.0 register 13-1 CMCON (and figure 13-1)
    CMCON=7 ' Disable analog comparator

    ok those comparator are already disabled by add the line just for safety sake

    So add
    ANSEL=0
    CMCON=7
    at the top of your code.
    About now?
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. Communicating between two PICs over DC bus
    By elec_mech in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 7th May 2009, 13:57
  2. Sharing Max232 with two pics?
    By zx81sp in forum Serial
    Replies: 10
    Last Post: - 28th April 2009, 23:22
  3. Retrieving infos from multiple PICs on a bus/chain
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 15th October 2007, 05:42
  4. Programming Pins of PICs?
    By Kamikaze47 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 15th August 2007, 19:59
  5. Self Destructing pics? Copy protection
    By Rob Martin in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 22nd March 2004, 10:39

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