Serial communication with pic18f452


Closed Thread
Results 1 to 6 of 6
  1. #1
    Join Date
    Dec 2006
    Posts
    21

    Default Serial communication with pic18f452

    Dear Freinds ...

    I Have a project where two Pic's exchanges messages ... The problem is that Pic18f452 which is the master mcu in my project become unresponding after several serial communications with the slave one ... In the top of my program , I put this line :
    Adcon1 = 7 to make all analog pins digital ... But when i searched the datasheet i found 011x ... What does this
    'x' refer to ?

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


    Did you find this post helpful? Yes | No

    Default

    'x' mean don't care, so it could be 1 or 0.
    For you communication problem, if you use the PIC USART and HSERIN make sure you do some error trapping or insert DEFINE HSER_CLROERR 1 at the top of your code.

    If you're not using the PIC USART but use SERIN/SERIN2/DEBUGIN etc etc... well you may some problem depending how your code flow and how you have implemented it. Of course if you use them on your favourite I/O, make sure you have disable all multiplexed features such as analog comparator, ADCs, voltage reference etc etc.

    HTH
    Last edited by mister_e; - 30th December 2007 at 21:01.
    Steve

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

  3. #3
    Join Date
    Dec 2006
    Posts
    21


    Did you find this post helpful? Yes | No

    Default

    So what can make a pic18f452 unresponding ?

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


    Did you find this post helpful? Yes | No

    Default

    I've edited my post while you replied..
    asm
    GOTO $-2
    endasm
    Steve

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

  5. #5
    Join Date
    Dec 2006
    Posts
    21


    Did you find this post helpful? Yes | No

    Default

    I uses Serout and serin and i disabled analog by 'adcon1 = 7'

  6. #6
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,115


    Did you find this post helpful? Yes | No

    Default

    Why don't you post your code to have a look over it?

    It might be easier to debug...

    Ioannis

Similar Threads

  1. Wireless serial communication question
    By Ahmadabuomar in forum Serial
    Replies: 3
    Last Post: - 21st December 2009, 03:49
  2. Bootloader,MCSP and Serial communication
    By surfer0815 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 3rd March 2006, 10:52
  3. Serial Communication using 12F629
    By charudatt in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 14th March 2005, 04:24
  4. Serial communication PIC to PIC help.
    By Rubicon in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 24th January 2005, 15:45
  5. Replies: 8
    Last Post: - 11th November 2004, 20:08

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