Quote Originally Posted by mackrackit View Post
This is what you need with a 4MHz external
Code:
DEFINE OSC 48
@ __CONFIG   _CONFIG1L, _PLLDIV_1_1L & _CPUDIV_OSC1_PLL2_1L & _USBDIV_2_1L
@ __CONFIG   _CONFIG1H, _FOSC_HSPLL_HS_1H
@ __CONFIG    _CONFIG2H, _WDT_OFF_2H & _WDTPS_512_2H
@ __CONFIG    _CONFIG3H, _PBADEN_OFF_3H & _MCLRE_OFF_3H 
@ __CONFIG    _CONFIG4L, _LVP_OFF_4L & _ICPRT_OFF_4L &_XINST_OFF_4L

Ok been away from this for a few days, sanity protection etc...

tried that in my 18f2550.inc, all worked except for icprt_off_4l was causing an error, so i will leave that bit out for now.

Am i right in the assumption if i want to also try with a 20mhz crystal then only thing i need change is the plldiv to a 5, and leaving cpudiv as is will still then give me 48mhz clocking?

I have acquired a USB/rs232 dongle from the usual chinese supplys on ebay, I thought it would be pl2303 based inside but its a full 3 chipset device, so looks very reliable, made by targus, app not windows 7 compat, but on xp so...

Anyhow, by plugging this in the folowing manner

usb<----targus232-----<---max232----sniffer wire and spare tx wire

by doing the above and setting xp's device mangler to 9600, i can see on my scope signals fro the targus are very like what i get from the 18f2550, by connecting the 'sniffer wire' to the 18f2550, i can see data from the pic, if i incorrectly set the targus, i dont, so the fail proves that its not autobauding and that when it receives char's at a displayed 9600, it really is 9600

so, looks like the pic is tx'ing correctly, and i with the sniffer wire i can see when i connect the 'gsm unit' to the pic, and tell it to 'atdt123' that it replies with 'atdt123' (echo must be on) then after a pause it sends 'no carrier'

I can not seem to receive the 'no carrier' with the pic, but the sniffer wire proves its being sent back, and at the same data rate, ie 9600

so as i have no hadshaking, either i am misisng the window of opportunity, which i doubt as i have about 3 seconds to prep for it, or the 3v logic is too low to trigger hserin