Quick Fast‑Track Build
Parts List
- USB → TTL serial cable (e.g. from eBay)
- 434 MHz AM RX/TX module pair (310 MHz for USA)
- PIC16F88 microcontroller (pre‑programmed with PCUSB21.hex below)
- 3 mm bi‑colour LED + 330 Ω resistor
- 100 µF electrolytic capacitor
- Veroboard or pre‑designed PCB
Initial testing of the USB cable
Follow the instructions to install the drivers on the Windows PC. You can test that the USB to serial lead is working by shorting the RX and TX together (careful not to short anything else).
Select the comm port in the windows test program.
Any commands sent from the test program should appear in the receive window.
Fill some numbers into the address, data1, data2 and data3. click send command.
The data should appear as a received command.
Wiring & Assembly
- Solder USB cable wires:
Red → VCC (5 V)
Black → GND
Green (PC TX) → RB0
White (PC RX) → RB1 - Connect:
RF TX data line to RA2
RF RX output to RA3 - Include an ICSP header for easy PIC re‑flashing.
Operation
- Plug USB‑TTL into PC: LED stays green when idle
- Run Test App, select COM port → Connect
- Set Address ≠ 1 & Data fields to anything, click RGB button → Send
- LED flashes red on transmit; flashes green (valid) or double‑flash (invalid) on receive
Downloads
- PCUSB21.hex
- Proteus Simulation (.ZIP)
- Thorian Test Software page coming soon
Advanced - Show code, timing diagrams & packet format
TTL‑Serial Transmit Routine
TTLtx: MOVWF divisor MOVLW D'8' MOVWF byteL bcf PORTB,1 ; start bit MOVLW D'9' call uSdelay mainLoop: btfsc divisor,7 bsf PORTB,1 call uSdelay rlf divisor,F decfsz byteL,F goto mainLoop bsf PORTB,1 ; stop bit MOVLW D'9' call uSdelay return
RF Transmit Packet
RFtx: bsf PORTA,2 ; AGC on 9ms MOVLW D'18' call MSdelay bcf PORTA,2 ; AGC off 4.5ms MOVLW D'9' call MSdelay movf deviceaddress,W ; copy deviceaddress value to W movwf data1 ; copy W to data1 call doRFbyte ; go transmit data1 ; repeat for devicecommand, devicecommand2, devicecommand3 bsf PORTA,2 ; stop-burst 670us, wait time before any more data can be transmitted MOVLW D'33' call uSdelay bcf PORTA,2 ; switch off TX return
Bit timing | Mark (RA2=1) | Space (RA2=0) |
---|---|---|
AGC Burst | 9 ms | 4.5 ms |
Bit “1” | 330 µs | 800 µs |
Bit “0” | 330 µs | 230 µs |
Stop‑burst | 670 µs | — |
RF Receive & Validation
RFgetByte: clrf tempdata MOVLW D'8' MOVWF counter getLoop: MOVLW D'40' call uSdelay rrf count,F btfss PORTA,3 goto skipSet iorwf tempdata,F skipSet: decfsz counter,F goto getLoop return
Photos & Gallery







