Serial comm between two PICs


Closed Thread
Results 1 to 25 of 25

Hybrid View

  1. #1
    Join Date
    Oct 2013
    Posts
    9

    Default Re: Serial comm between two PICs

    Here are the codes of pic1 and pic2.Pic1 have the quartc on 8 MHz but I gave it a DEFINE OSC 4
    becouse the pic2 works at 4 MHz.I am shure that everything works in PIC1 exept DEBUG becouse I checkedout.I am shure that PIC2 is running becouse it puts the port-out signals in the right order and it change the PIC2 addresses 00,01,02,03 to zero values (00,00,00,00).PIC2 have an internal OSC and it works at 4 MHz and I can't measure it, but PIC1 works in 8 MHz but I guess it devides the 8MHZ becouse I wrote DEFINE OSC 4.I am wondering if the BAUDRATE is to fast or is the code of DEBUG correct?
    Attached Files Attached Files

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,621

    Default Re: Serial comm between two PICs

    Hi,
    but I guess it devides the 8MHZ becouse I wrote DEFINE OSC 4
    Not at all. That's not what DEFINE OSC does, look it up in the manual.

    I am wondering if the BAUDRATE is to fast or is the code of DEBUG correct?
    Yes, the PIC is running at 8MHz but you're telling the compiler it's running at 4MHz. The compiler calculates the baudrate timings based on 4MHz when in reallity it's running twice as fast - the actual baudrate will be double what you tell it.

    /Henrik.

  3. #3
    Join Date
    Oct 2013
    Posts
    9

    Default Re: Serial comm between two PICs

    Ahaa I will change PIC1 code to DEFINE OSC 8 and then I will let you know what will happen.Thanks.

Similar Threads

  1. Pic to pic interrupt ans serial comm
    By ronjodu in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 10th May 2008, 22:43
  2. Multiple Pics to One serial port
    By Rleonard in forum Serial
    Replies: 1
    Last Post: - 18th January 2007, 18:30
  3. Big characters on HD44780 4x20
    By erpalma in forum mel PIC BASIC Pro
    Replies: 23
    Last Post: - 7th January 2007, 02:21
  4. 16F877, DS18S20 and Serial Comm Problem
    By YellowTang in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 26th April 2004, 10:36
  5. serial comm from Pic to STAMP
    By d1camero in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 4th April 2004, 23:58

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