Packets of bytes to HERSIN again


Closed Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2007
    Location
    Santiago, Chile
    Posts
    77

    Default Packets of bytes to HERSIN again

    Sorry for bugging you guys but I am going crazy.

    I receive data from a camera controller which sends groups of 7 bytes every time you move the joystick or enter a command. I have to keep my program running doing other things but need to catch every packet that comes.
    I got the interrupt thing working using HSERIN and also by reading RCIF directly but only with 1 byte at a time. Some good news is that the 1st byte is always $A0 and the 7th is always $AF. I need them in their respective bytes to be able to decode the command. The commands come at a rate of 4800bps and I am running a 16F877A at 20MHz.

    I have used SERIN2 successfully in the form SERIN2 port,speed,[byte1,byte2, yte3 etc etc]
    but using this system means that I have to continusly poll the SERIN2 command and while the PIC responds to the commands it sometimes looses another. I rather loose a response then a command.

    Regards


    Chris

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by crhomberg View Post
    Sorry for bugging you guys but I am going crazy. I receive data from a camera controller which sends groups of 7 bytes every time you move the joystick or enter a command. I have to keep my program running doing other things but need to catch every packet that comes. I got the interrupt thing working using HSERIN and also by reading RCIF directly but only with 1 byte at a time. Some good news is that the 1st byte is always $A0 and the 7th is always $AF. I need them in their respective bytes to be able to decode the command. The commands come at a rate of 4800bps and I am running a 16F877A at 20MHz. I have used SERIN2 successfully in the form SERIN2 port,speed,[byte1,byte2, yte3 etc etc] but using this system means that I have to continusly poll the SERIN2 command and while the PIC responds to the commands it sometimes looses another. I rather loose a response then a command. Regards Chris
    Same topic, different thread...

  3. #3
    Join Date
    Feb 2005
    Location
    Kolkata-India
    Posts
    563


    Did you find this post helpful? Yes | No

    Default Answered the other thread just now.

    Yeah! Same topic different thread. It is highly doable and as MisterE says learning oppertunities. Keep cool and you can solve the problem.
    Regards

    Sougata

  4. #4
    Join Date
    Apr 2007
    Location
    Santiago, Chile
    Posts
    77


    Did you find this post helpful? Yes | No

    Unhappy

    Thanks guys, I'm trying to keep cool.

Similar Threads

  1. Bits, Bytes Words and Arrays
    By Melanie in forum FAQ - Frequently Asked Questions
    Replies: 24
    Last Post: - 14th June 2016, 07:55
  2. Success! Are they 'words' or are they 'bytes'?
    By BitHead in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 27th December 2009, 16:54
  3. LP Instant Interrupts Error
    By Kamikaze47 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 7th December 2009, 09:13
  4. bytes compressed and encrypted
    By RAYMON in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 3rd March 2009, 11:24
  5. Replies: 4
    Last Post: - 11th December 2006, 14:38

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