DEBUG baud rates


Closed Thread
Results 1 to 7 of 7

Hybrid View

  1. #1
    Join Date
    Oct 2003
    Location
    holland
    Posts
    251

    Default

    Yes, ofcourse I know that. And it is also a problem of knowing if the other chip was ready for recieving data.
    That's why I used a HEF4731 in between. With oring the clock.
    I made also a line that i have data for my neighbour.
    When sending I write the data into the 64 bit register. And when the slave got a signal that I have data for him I read the 64 bit register.

    Serout and serin commands are also usable but I don't know what happens if the masterchip has to communicate at the same time with its hardware uart.

  2. #2
    Join Date
    Mar 2003
    Posts
    41

    Default FAST PIC to PIC comms

    Thanks for the insights guys. I will restate my problem.

    I have two PIC16F88 and two PIC16F877A on a single 100 mm square board. I have been using serin/out2 with the mode number set to 16390 which gives 38,400 bps. I use an RTS/CTS system to pace the communications and send every packet with a checksum. This has been a reliable means of communicating between the PICs but I now need it faster. I don't care what the speeds are as long as they are faster and preferably up around 100,000 bps.

    The boards are built and shiftin/shiftout traces are not on it. I also don't see how shiftin/shiftout can easily work in a peer to peer system. Shiftin/out needs a master to provide the clock. I cannot, or don't want to, use the USART HSERIN/OUT as this is reserved for the bootloaders and physically wired on the PCB to the bootloader ports. In a previous project I had intermittent trouble at startup with USART to USART comms where both PICs had MCSP bootloaders running. I think that on occasions the bootloaders would see each other and think mother was calling. They appeared to start a brief but merry dance between themselves and the system would then crash. The boot code was never overwritten thankfully.

    From a peek at the SERIN2 tables on the Melabs web site it seems that there are only certain speeds available to SERIN2. I don't know what happens if you just pick mode numbers at random but I doubt it will be pleasant.

    Because the baud rates are the result of some unknown (to me) math operations, and we have integer math divisor truncations, I am pretty sure there will be a few optimum and many sub-optimum baud rates with DEBUGIN and DEBUG. I don't care if the speeds are 'non-standard', I just want fast reliable comms.

    Does anyone have a table of preferred DEBUG/IN speeds similar to the SERIN/OUT2 speeds on the melabs web site or can they point me to an algorithm that computes this?

    Cheers
    Brian

  3. #3
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166

    Default

    btaylor, Why not use the HSERIN/OUT commands? That way you can use the full speed of the hardware UART. At 20 Mhz. crystal rate and SPBRG set to 1 with the BRGH bit set to 1 you should get about 125000 baud.

    Dave Purola,
    N8NTA

Similar Threads

  1. N-Bit_MATH
    By Darrel Taylor in forum Code Examples
    Replies: 38
    Last Post: - 16th December 2010, 15:48
  2. A Serial GLCD 128x64 Simple Project
    By Oldspring in forum Off Topic
    Replies: 0
    Last Post: - 8th March 2010, 21:58
  3. debug not working with MPASM assempler
    By santamaria in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 4th March 2009, 08:51
  4. Auto Baud Rate Detection
    By mytekcontrols in forum Serial
    Replies: 10
    Last Post: - 31st October 2005, 03:17
  5. Baud Rate and Timing Calculator
    By picnaut in forum General
    Replies: 3
    Last Post: - 23rd January 2004, 17:48

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