HSERIN w/ the Great DT-INT


Closed Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2010
    Posts
    50

    Default HSERIN w/ the Great DT-INT

    Reading all the interrupt stuff lately, I am trying to use it to solve a problem I have. I am trying to set up a hardware serial transmission of data from PC to PIC (18F46K22) at 115200 baud. I need to transfer 20 bytes of data repetively, then write the data to a memory chip. So after many other attempts to perform this task, I have resorted to interrupts. My thoughts are that I will signal the PC that the PIC is ready for data in the main routine, by setting CTS (connected from a pic pin to the pc CTS line) high. This then uses a Windows Comm Control Comm Event to signal something changed. Once the PC sees a CTS event and sees that CTS is high, it sends the 20 bytes of data. I know that the PIC hardware serial port has only 2 bytes of storage but I think that when the interrupt is recieved notifying that data is in the receive buffer, I will grab the whole 20 bytes, hopefully preventing an overflow. Just to get it going and not worrying about missing some data, I clear the overflow bit after every receive.
    This seems to work for a few interations, but then all just stops. I am still trying, but would appreciate any help that anyone could provide. Code attached
    Attached Files Attached Files

  2. #2
    Join Date
    Sep 2010
    Posts
    50

    Default DT The Great Interrupts

    Please check out this thread

    http://www.picbasic.co.uk/forum/showthread.php?t=16142

    Interrupt attempt to solve a serial comm problem. Help Greatly Appreciated!

Members who have read this thread : 1

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