SEROUT2 Byte Array In HEX Format


Closed Thread
Results 1 to 14 of 14

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,139


    Did you find this post helpful? Yes | No

    Default Re: SEROUT2 Byte Array In HEX Format

    This string is 65 bytes long and has a space after the CC.

    Is that correct?

    Ioannis

  2. #2
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    704


    Did you find this post helpful? Yes | No

    Default Re: SEROUT2 Byte Array In HEX Format

    Quote Originally Posted by Ioannis View Post
    This string is 65 bytes long and has a space after the CC.

    Is that correct?

    Ioannis
    No, that space shouldn't be there. There are 64 characters followed by a comma.
    "No one is completely worthless. They can always serve as a bad example."

    Anonymous

  3. #3
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    704


    Did you find this post helpful? Yes | No

    Default Re: SEROUT2 Byte Array In HEX Format

    I sent these 65 bytes every 100 mS. The data rate of the HC-05 seems to be high,

    It uses the 2.45GHz frequency band. The transfer rate of the data can vary up to 1Mbps and is in range of 10 meters.
    The HC-05 module can be operated within 4-6V of power supply. It supports baud rate of 9600, 19200, 38400, 57600, etc.
    https://www.geeksforgeeks.org/all-ab...7600%2C%20etc.

    I think that the lost packages issue has to do with the way I'm sending the data,

    Code:
        FOR I = 0 TO 31
            SEROUT2 PORTC.1,84,[HEX2 SquaresArray[I]] 
        NEXT I
        SEROUT2 PORTC.1,84,[","]
    Do you see anything wrong with this code?
    "No one is completely worthless. They can always serve as a bad example."

    Anonymous

  4. #4
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,612


    Did you find this post helpful? Yes | No

    Default Re: SEROUT2 Byte Array In HEX Format

    No, I don't see anything wrong with that code. Have you tried increasing the delay between packages?

  5. #5
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,139


    Did you find this post helpful? Yes | No

    Default Re: SEROUT2 Byte Array In HEX Format

    I would also check with a terminal on a PC what the serial port of the PIC sends out.

    Maybe there is an electrical problem with the port.

    I suppose you are using without an RS232 driver since the 84 implies a true TTL level.

    For a PC sniffing you need a driver though.

    Ioannis

  6. #6
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    704


    Did you find this post helpful? Yes | No

    Default Re: SEROUT2 Byte Array In HEX Format

    Thanks, I will try both of your suggestions.
    "No one is completely worthless. They can always serve as a bad example."

    Anonymous

Similar Threads

  1. Byte to Hex
    By enigma in forum General
    Replies: 7
    Last Post: - 11th July 2017, 14:39
  2. Struggling again with SEROUT2 and numbers format
    By Fanias in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 12th April 2014, 05:42
  3. Serial Byte Format
    By mbruno in forum Serial
    Replies: 2
    Last Post: - 7th February 2008, 14:27
  4. Need help converting to ASCII Hex format
    By tcbcats in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 26th August 2007, 19:14
  5. Word array behaving like byte array.... wierd
    By forgie in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 2nd August 2005, 15:43

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