What is a package.?
What else is sent ?
Are interrupts involved ?
My best guess is that the trouble is in the code not shown and that snippets are a yet again a pointless waste of time and effort
What is a package.?
What else is sent ?
Are interrupts involved ?
My best guess is that the trouble is in the code not shown and that snippets are a yet again a pointless waste of time and effort
Warning I'm not a teacher
The data package looks like this 432551346666666600000000000000000000000000000000CC CCCCCCA98BB79A,. This is just 32 bytes in HEX format followed by a comma. The comma is just to delimit the packages. There are not interrupts involved. I'm trying to use the following code, but it doesn't work
Code:SEROUT2 PORTC.1,84,[hex2 STR SquaresArray\32, ","]
"No one is completely worthless. They can always serve as a bad example."
Anonymous
This string is 65 bytes long and has a space after the CC.
Is that correct?
Ioannis
I sent these 65 bytes every 100 mS. The data rate of the HC-05 seems to be high,
https://www.geeksforgeeks.org/all-ab...7600%2C%20etc.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.
I think that the lost packages issue has to do with the way I'm sending the data,
Do you see anything wrong with this code?Code:FOR I = 0 TO 31 SEROUT2 PORTC.1,84,[HEX2 SquaresArray[I]] NEXT I SEROUT2 PORTC.1,84,[","]
"No one is completely worthless. They can always serve as a bad example."
Anonymous
No, I don't see anything wrong with that code. Have you tried increasing the delay between packages?
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
Bookmarks