I got a BenQ Gsm Modem, so far I got it running sending AT commands from PC to GSM module via hyperterminal using USB to serial converter. The GSM module is operates in 3.3v, Pic16F628A on 5v.
Questions:
1.] Obviously I going to need a voltage divider between the module and PIC, but how can I or can Imake Pic16F628A operate on a 3.3v, based on the datasheet in can operates 2.0-5.5v
2.] I want to try using the following setup connection(refer to the attach image) and the code below..
Where it simply waits for 'OK'. Can I use PortC.6 (with max232) to COM Port at the same time?Code:Include "modedefs.bas" ' Include serial modes 'Definitions DEFINE OSC 4 'for 4 Mhz 'DEFINE OSC 8 'for 8 Mhz DEFINE HSER_TXSTA 20h 'hardware assign DEFINE HSER_RCSTA 90h ' DEFINE HSER_BAUD 9600 'for 9600 Baud rate DEFINE HSER_SPBRG 12 ' DEFINE HSER_CLROERR 1 ' TRISB=%00000000 PORTB=%00000000 ' Send signal tp PWON HIGH PORTB.7 PAUSE 500 Low PORTB.7 PAUSE 3000 start: HSEROUT ["AT",13] 'Send AT to modem followed by a CR HSERIN 5000, start, [WAIT("OK")] ' wait 5sec to reply. PAUSE 1000 goto start End
thanks,
mbox




Bookmarks