I posted an example here: http://www.picbasic.co.uk/forum/showthread.php?t=12555
that makes learning IR button codes really easy. It uses a special capture module on the
18F2431 that captures everything. High signal period, low signal period, and spits it all out
to a serial terminal window. You can learn every button code on your remote in just a few
minutes.