Im trying code to comunicate a PIC12F675 with a GSM SIM800L, this is my first code:
#chip 12F675, 4#option Explicit#include<SoftSerial.h>#DEFINE RELE GPIO.0#DEFINE DEBUG_TXD GPIO.1#DEFINE CALL_INT GPIO.2#DEFINE DEBUG_RXD GPIO.3#DEFINE GSM_RXD GPIO.4#DEFINE GSM_TXD GPIO.5DIRRELEOUTDIRDEBUG_TXDOUTDIRCALL_INTINDIRDEBUG_RXDINDIRGSM_RXDINDIRGSM_TXDOUT#define SER1_BAUD 9600 ; baudrate must be defined#define SER1_TXPORT GPIO ; I/O port (without .bit) must be defined#define SER1_TXPIN 1 ; portbit must be defined#define SER1_RXPORT GPIO ; I/O port (without .bit) must be defined#define SER1_RXPIN 3 ; portbit must be defined#define SER2_BAUD 9600 ; baudrate must be defined#define SER2_TXPORT GPIO ; I/O port (without .bit) must be defined#define SER2_TXPIN 5 ; portbit must be defined#define SER2_RXPORT GPIO ; I/O port (without .bit) must be defined#define SER2_RXPIN 4 ; portbit must be definedwait500msSer1Print"Debug Port"'sendatextwait500msSer2Print"GSM Port"'sendatextEND
The first Software Serial works fine but the Second Send Garbage, Anyone can help me?
Thanks for you Help.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi
Im trying code to comunicate a PIC12F675 with a GSM SIM800L, this is my first code:
The first Software Serial works fine but the Second Send Garbage, Anyone can help me?
Thanks for you Help.
No expert here ... but,
Does Ser2 work when Ser1 is not configured?
If you flip the serial ports from Ser2 to Ser1 does that work ?
I just looked at the ASM. Looks good comparing Ser1 to Ser2 routines. So, try the changes above as this will inform us.