dinsdag 22 juni 2010

The turret project

Just to let you know what I'm currently working on (apart from editing my book): getting the ISD4002 to play sound. I hooked it up to a PIC18F2450 (first time I'm using an 18F series microcontroller, but getting it to work was relatively easy). My first issue was that the ISD4002 uses 3V, but I used an LM 317 equivalent to create a separate 3V supply. 3V into the miceocontroller is no problem (2V is considered 'high'), but the output needed to be scaled down. There was a solution on the Internet using a resistor network with a 1.5k and 1k resistor, but I decided to just toggle the TRIS register and have a pull up resistor to 3V, making the output switch between 0V and 3V.

I thought I had everything coded correctly, but recently understood that the CLK can't have a frequency higher than 1,000 kHz (which some interpret as 1 kHz, but I think it means 1000 kHz). Since I'm clocking at 10 MHz, I might need to slow things down a bit, still. I'll try later with a shorter delay.

The biggest problem is that I can't test what fails: I have to first record something, and then play it back. So I never know whether the recording or the playing back goes wrong. I might have to look at the responses from the chip to see if that indicates something.

Geen opmerkingen: