Sky+ HD HTPC/Media Centre Build PT 4

If you’ve not read the other parts, please look here: Part1 Part2 Part3

The boards arrived from OSH Park this morning. I’ve had a look and there may be an issue with the pads for the USB controller. It looks like a pad has ‘bled’ but there is a tiny bit of clearance so running a scalpel in there may fix it. Its also clear that the FT232RL was a bad choice, it is on a stupidly fine pitch and I can see it being problems. As it is it’s going to be a paste and relow oven job. Now I could be lazy and simply pick up the pads and use a TTL convertor however this means I need to either internally mout a USB socket or strip off the USB Plug. I wanted to keep this all professional looking so thats out.

The parts were ordered today so we should have something to build and flash tomorrow, here’s hoping.

Now, two considerations now. There were two bits of code that needed looking at, the power LED and power control. With the mock up the PIC now boots, grabs control of the serial line, sends commands to the display then goes back to the PC. There seem to be two issues though.

1) The panel ignores the PIC. I can only assume this may be a result of me using diodes rather than an OR (I didnt have one) and will be ok on the new boards. However looking at the timings I did notice that there is a definate difference between what my PC thinks is 19200 and what the PIC thinks it is. Theres a tiny amount of error in the PIC timings and its possible parasitic capacitances, bad routing etc on the breadboard is causing it. I havent scoped what is going up to the display so there may be other nasties there, the analyser just says on or off. The power LED was a nice extra but the machines do boot fast enough. I had intended to use the blue rings to indicate fault conditions but never mind.

2) The remote LED no longer works with the front panel buttons. Its not a problem but I’d like to know why. The thought is that the PC is replying before the PIC has finished processing and may be causing a funny with the serial routing selects.

Power control. This still isnt done but will get done tomorrow (or in a minute). This is simple. The board should power up and wait for ‘n’ seconds for the ATX 5V rail to come up. The board should automagically do this but I’ve noticed BioStar boards dont always. After this delay an ATX power on will be sent via the relay and it’ll wait again. All being well the 5V line will come up and off we go. If this doesnt happen the hope was to display two halves on the ring () flashing to say that something went wrong.

Once the system is up pressing the power button will send a sleep command via the driver to Windows. The syste, should then hibernate. Holding it down will force an ATX powerdown. When the PIC sees the ATX 5V line go low it’ll then wait for another power buttone press to pule the power switch OR for the 5V line to come up on its own signalling the machine was woken up.

I have to code this but with simple flags it wont take too long.

I’m also thinking about using a boot loader here too. There is a lot more I could add to the firmware but right now it just needs to work. A simple botloader would enable updates to the firmware when the driver application is updated. The micro does receive serial data from the panel, PC and the IR receiver and being a PIC16F870 theres a lot of room for things like timers, remote code and the aforementioned watchdog too.

Almost there….

Leave a Reply

Your e-mail address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.