That is one way to do it but I need a simple way to read the Sony protocol. I liked the way this code works because it doesnt require any hardware peripherals. Please help me figure out why this isnt working.Code:pulse var Word x var byte signal var word ANSEL = %00000000 Start: Pulsin PORTC.3, 0, pulse if (pulse < 220) or (pulse > 260) then start signal = 0 x = 1 Loop: pulsin PORTC.3, 0, pulse if (pulse > 90) then ADD_X READ_IR: x = x * 2 if (x = 255) then start serout PORTC.2, 2, [#signal] goto loop ADD_X: signal = signal + x goto read_ir end




Bookmarks