Quote:
You've turned on the Timer1 Oscillator (T1CON.3), which would be used if you had a 32khz crystal on Timer1.
For pulses on T1CKI the T1OSC needs to be turned OFF.
I tried it both ways when i discoverd i had a problem and i couldn't find a yes or no as to wether it should be on or off...
Quote:
The CCP module has a minimum frequency of 1,465hz when using a 24mhz crystal. But you shouldn't be running a 16F877A at 24mhz anyway. The max is 20Mhz.
But even at 20mhz, the minimum PWM frequency is 1221hz.
Datasheet mentions nothing about a minimum frequency...
As for running at 24MHz... it runs very nicely, i'm tempted to try a 33MHz xtal just to see if it runs...
Quote:
The following line does absolutely nothing. It does NOT set the configs.
Which brings the question ... What are your CONFIGs set to?
I'm aware this line doesn't do what it's supposed to... i havn't found the correct line yet...
basically, everything off, xtal set as HS
Quote:
The bs1defs.bas include file can help when trying to use a Basic Stamp 1 program with PicBasic Pro.
If you're writing the program from scratch in PBP, it's of no use.
Indeed, it was quick and dirty...
Quote:
8 bits is default to begin with. This line does nothing.
I decided it safer not to trust the 'default' settings and set them anyways. that way i don't need to worrie about the defaults nor do i need to worrie about something getting set/reset uppon a brownout...
Quote:
If you will be using ADCIN then you need to put the AD clock setting in the ADC_CLOCK define.
By setting the individual bits in ADCON0, they will be overwritten every time an ADCIN statement is used.
And PBP defaults to AD clock 3 (internal osc).
oops, missed a setting... now added ADC_CLOCK 3 line
Quote:
You GOSUB to TMR1setup, then program execution "Falls into" the TMR1setup routine again.
When it hits the RETURN, the program will jump off into la-la land.
But maybe you just didn't include the parts in-between.
I have a goto main line at the end of my init... i allready said the software has been running in sim and in live PIC...
Thanks for the tips darrel it's appreciated...