Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
ARE YOU USING THE SAME PIC CLOCK?
IF the clock isn't the same the code won't have the same delay it will be set to an entirely different baud rate.
can a 12f629 go that fast most of what I have seen are set a lot slower it only runs 4mhz. When doing uart with one the fastest I have been able to get to work in hyper terminal was slow 9600 But it maybe my cable is to long it was about 6 feet. Atom your right it's 115200 that what there site saidi think the baud rate is : 115200
The IR Widget counts the number of infrared pulses that occur within a 100 microsecond period. The count is sent to the PC at 115200 bps. This repeats every 100 microseconds. This is effectively a frequency counter with a 100 microsecond gate time.
NIGEL i tried your IR tutorial and when i press a button it says Device = 00 and Command = 16 for every button i press. i hope to mod it for use with my remote. It does work well with my sony remote..
can a 12f629 go that fast most of what I have seen are set a lot slower it only runs 4mhz. When doing uart with one the fastest I have been able to get to work in hyper terminal was slow 9600 But it maybe my cable is to long it was about 6 feet. Atom your right it's 115200 that what there site said
I think this was what was wrong with my setupBut it maybe my cable is to long it was about 6 feet. Atom your right it's 115200 that what there site said
"Before transmission via the IR LED, the HIGH period of each 1.778ms
symbol is modulated at 36kHz with a duty factor of 0.25. Each
half-symbol period which is HIGH therefore contains 32 pulses with an
on-time of 6.944us and a repetition period of 27.777us."
Constant bit time of 1.778ms (64 cycles of 36 kHz)
LIST P=18F2525 ;directive to define processor
#include <P18F2525.INC> ;processor specific variable definitions
CONFIG OSC = INTIO7, WDT = OFF, MCLRE = ON, LVP = OFF, XINST = OFF, LPT1OSC = OFF
#DEFINE irL LATB
#DEFINE irT TRISB
#DEFINE ir 0
CBLOCK 0x000
EXAMPLE ;example of a variable in access RAM
d1
d2
d3
ENDC
ORG 0x0000
Init:
movlw 0x00
movwf OSCTUNE
movlw 0x72
movwf OSCCON
Osc:
btfss OSCCON,IOFS
goto Osc
bcf irT,ir
Main:
bsf irL,ir
call Delay500mS
bcf irL,ir
call Delay500mS
goto Main
;Delay 500mS aka half a second
Delay500mS
movlw 0x07
movwf d1
movlw 0x2F
movwf d2
movlw 0x03
movwf d3
Delay500mS_0
decfsz d1, f
goto $+4
decfsz d2, f
goto $+4
decfsz d3, f
goto Delay500mS_0
goto $+2
goto $+2
goto $+2
return
END
Manchester library.
Example Code
// import libraries...
include "Manchester.bas"
include "USART.bas"
include "Convert.bas"
dim EncodedValue as word
dim DecodedValue as byte
SetBaudrate(br19200)
EncodedValue = Encode(42)
USART.Write("Encode : ", BinToStr(EncodedValue, 16), 13, 10)
if Decode(EncodedValue,DecodedValue) then
USART.Write("Decode : ", DecToStr(DecodedValue), 13, 10)
else
USART.Write("Error!", 13, 10)
endif