I think the best approach is to create a procedure (using ASM or using the CCP module) to generate a 1ms burst of ~120kHz and then call it as needed from PBP. That gives you the flexibility to send arbitrary patterns. If you also use Darrel's Instant Interrupt's, you can do the X-10 part in the background, sending a manchester half-bit at each zero-crossing.Originally Posted by ardhuru
Using the CCP module, you could even use a timer to end the ~120kHz burst and do single or 3-phase in the background with minimal loss of processing time. This would also allow you to listen to the powerline during manchester 0 half-bits to detect collisions. Note that it does no good to listen if using a TW523 or equivalent as it delays its output by 22 powerline half-cycles, acting like a 22-bit shift register with the powerline frequency as its clock.




Bookmarks