Newbie question re outputting square wave.
I have the following code:
The output will not toggle at frequencies greater than 2.7KHz. I have just received the P1 yesterday, but no crystal. The internal RC is certainly very temperature dependent. I have tried some serial comms but to no avail, probably pointless until I get the crystal. My goal is to set up the P1 as a multi-function I/O device (Servo, PWM, Sound, Pulse Counter etc.) for an educational board based on the ESP8266 that I have designed. I plan on using the P1 as an I2C slave, would anyone advise serial comms instead? I have more questions but I need to invest some time in reading the fine manual.
'' Max output frequency = 2.7KHz PUB Main dira~~ repeat outa := 1 ' waitcnt(clkfreq/32000 + cnt) does not change output waitcnt(clkfreq/31000 + cnt) outa := 0 waitcnt(clkfreq/31000 + cnt)