0 Members and 2 Guests are viewing this topic.
Lbl READWhile 1EndIf port //wait for the start bit to endFor(r1,0,7) If EAT() //return if Stop bit reached or abort Goto END End GET()->{L1+r1} //buffer the inputEndLbl END0->r2 //resultFor(r1,0,7) r2*2->r2 //shift left {7-r1+L1}+r2->r2 //reverse and "or" togetherEndr2ReturnLbl EAT //"eats" the Low stateFor(r3,0,100) For(20):End //some delayEnd!If port //wait until HIGH againr3>100 // time out exceeded = Stop bitReturnLbl GET //measures the length of a HIGH pulse and returns the result as a bitFor(r3,0,100) For(25):EndEndIf port //wait until LOW againr3 > 8 //8 seemed to be the threshold that worked bestReturn
[3C7EFFFFFFFF7E3C]->Pic1FnOff //disable the nasty OS interrupts44->X28->YWhile 1 !If port //check for a keypress READ()->K K-244??Y-- //up K-245??Y++ //down K-180??X-- //left K-179??X++ //right Pt-On(X,Y,Pic1) DispGraphClrDraw EndEndIf getKey(15)LnReg //turn interrupts back onReturn--- Subroutines from above ---
WOAH DOOD How do I build this???
Maybe you can use this for things like a wireless link to a laptop or phone.
If you add an emitter to it you can make an universal remote control. A small circuit can do the modulation for the calc.
MGOS, 33 KHz isn't that fast for a 6 MHz processor. You can do port writes at least 1 MHz, assuming you have what you need to transmit.
The IC demodulates the data, so it´s not 33kHz anymore. It´s just the carrier that is 33kHz.