Following up on the PIC Timer Calculator program errors, I decided to review the USB IR Toy firmware source briefly.
Looking in HardwareProfile.h, it appears that the 10 µs timer for TVBGONE was originally calculated as (65415) or 0xFF87, which would produce 10.083 µs, but later changed to 0xFF9A, which would produce 8.5 µs. I think that if 10 µs is really the goal (note that I have not researched TVBGONE to confirm this), then 0xFF88 (65416) would be better, since it produces precisely 10 µs.
#define T1_10usOffset() TMR1H=0xFF; TMR1L=0x88
Similarly, I've already explained that 64336 should be the preload for 10000.0 kHz.
#define T1_OFFSET 0xFB50 //64336 preload = 10000.0 kHz
#define T1_OFFSETH 0xFB
#define T1_OFFSETL 0x50
I have not reviewed the Timer2 values. They might be right, since the interrupt occurs on TMR2 to PR2 match. That's not the same as interrupt on overflow. I think that the PIC Timer Calculation program might produce the right values here, since the Timer2 does count up from 0 to PR2. Then again, counting from 0 to N still gives a period of N+1, so they could be off by one after all.
You're correct. Maybe the program's example source subtracts 1 to adjust? I should have done that, and I'll add it to the list of things that should be changed for the v1.2 firmware release.
The TVBGONE values were found by messing with the settings until the signals had the right timing on a logic analyzer. They were selected through experimentation. The PIC code has some overhead, and the smaller timer values allow for that.
Speaking of the v1.2 firmware release, is this something with a public source code revision repository? If so, then I may be able to help with some things once I finally get started with the USB IR Toy.
Yup, all code is in the SVN at google code (you have to get the USB stack from Microchip yourself for licensing reasons, but we're working hard on that too):
http://code.google.com/p/dangerous-prot ... y-firmware (http://code.google.com/p/dangerous-prototypes-open-hardware/source/browse/#svn/trunk/USBIRtoy/IRtoy-firmware)