0 Members and 1 Guest are viewing this topic.
; Byte to send in register “SerialData“SerialBegin: MOVLF 0x8,CountSerialout: BTFSC SerialData,0 BSF SDATA BTFSS SerialData,0 BCF SDATA BCF CLOCK SDelay 0x12 ; delays have to be adjusted depending on clock speed; in that case: 18*3+6=60 cycles @ 1 MHZ -> 60µs BSF CLOCK SDelay 0x12 RRF SerialData DECFSZ Count,1 GOTO Serialout Return
; GET(); gets a byte from the port as a sequence of 0s and 1s on the ring; (bit 1 of port 00h) on falling edge of the tip (bit 0 of port 00h); the sequence begins with least significant bit.; (1) Read tip; (2) Repeat (1) until tip low; (3) Read ring; (4) Put that at bit 0 of result; (5) Rotate result right; (6) Wait until tip back high; (7) Repeat from (1) total 8 times ld bc,$0803 ld hl,$0000loop: in a,(00h) bit 0,a jr nz,loop and c sra a add a,l rrca ld l,await: in a,(00h) bit 0,a jr z,wait djnz loop
Keoni, there is, we're talking in it right now.
The TI-interface is coming along nicely, so that might be your first product right here. As for the PIC mcu: It's really easy to port the link protocol. Just change some of the hardware specific stuff like interrupts and ports and you're good to go. Just hooking up accelerometers using I2C is also possible with calculators. The link protocol I wrote is very similar to I2C, so with some modifications a low speed I2C protocol can be implemented in AXE (low as opposed to 100Mb/s)