Mercurial > public > hwos_code
comparison src/mcp.asm @ 28:fcaf94b913db
rx isr
author | heinrichsweikamp |
---|---|
date | Sat, 20 Jul 2013 16:02:35 +0200 |
parents | 11d4fc797f74 |
children | 24b3fd59e61f |
comparison
equal
deleted
inserted
replaced
27:a0fc5d6c207e | 28:fcaf94b913db |
---|---|
262 mcp_write_config .6 | 262 mcp_write_config .6 |
263 | 263 |
264 ; mcp_writebyte_1st b'11000000' ; Read from Config0 | 264 ; mcp_writebyte_1st b'11000000' ; Read from Config0 |
265 ; mcp_writebyte_2nd b'00000000' ; Dummy clks + Odd Parity Bit (Bit0) | 265 ; mcp_writebyte_2nd b'00000000' ; Dummy clks + Odd Parity Bit (Bit0) |
266 ; call mcp_readbyte ; read into mcp_temp+0 | 266 ; call mcp_readbyte ; read into mcp_temp+0 |
267 return | 267 bsf INTCON3,INT3IE ; Enable INT3 |
268 bsf INTCON2,INTEDG3 ; INT3 on rising edge | |
269 | |
270 ; Setup Timer 0 | |
271 movlw TMR0H_VALUE | |
272 movwf TMR0H | |
273 bcf INTCON,TMR0IF ; Clear flag | |
274 clrf TMR0L | |
275 return | |
276 | |
277 global mcp_sleep | |
278 mcp_sleep: | |
279 bcf INTCON3,INT3IE ; Disable INT3 | |
280 bcf mcp_power ; RX off | |
281 btfsc mcp_power | |
282 bra $-4 | |
283 return | |
284 | |
268 | 285 |
269 | 286 |
270 END | 287 END |