Re: SEROUT 12F683 and GPIO.5
Have you tried it on real hardware?
Your OSCCON seems correct for 8MHz but it's my understanding that you ALSO have to tell Proteus at which frequency the virtual PIC is supposed to be running, it doesn't actually use the value of the x-tal or, in this case, the internal oscillator. I've never used it though so I may very well be wrong.
/Henrik.
Re: SEROUT 12F683 and GPIO.5
Proteus will adjust the internal oscillator frequency according to the OSCCON register, which overrides the oscillator frequency set in the parts dialog box.
But your define osc8 is not correct.
It should be ...
Without a correct DEFINE OSC, PBP assumes it is 4Mhz.
Re: SEROUT 12F683 and GPIO.5
Thanks, that appears to have fixed it. It's often the simplest of things.
Re: SEROUT 12F683 and GPIO.5
I went back to this program after doing some other things and found I'd missed part of the point. My define statement should have been in all caps and not used lower case characters. All the defines are case sensitive not just the define oscillator. I wish PBP would throw up an error during the complile as it surely could check for that. Of course, I may have shut that attention getter off at some previous session.
I've promised myself I'd look back over the manual again to acquaint myself with the nuance of the language. Oh joy!
Re: SEROUT 12F683 and GPIO.5
It would be nice if microcode studio would make a permanent substitution along with a warning.
Robert
Re: SEROUT 12F683 and GPIO.5
Just code pbp with caps locked on... Then no worries .