Couldnt read MT8888

Hi..

I'm trying to build my own PSTN-based home controller.

Yes, I know that many would suggest to build IP-based one. The problem is subscribing internet here is far more expensive than subscribing PSTN-line. Sucks..

Anyway, I use AVR Mega8535 with MT8888 so I can control my house and get its status (through code that's encoded using DTMF).

But I'm having trouble with reading MT8888 decoded DTMF.

I can setup and read the IRQs (the MT8888 IRQs is ACTIVE whenever the DTMF signal comes into the board, it works just fine on me). Then I can read the status (the status shows that there is some data in the receive buffer and the IRQ is ON, that's good and it supposed to be so).

But, whatever phone key that I pressed, I always get 0 (0x0) in the received data register. I already change the MT8888, the xtal, resistor (to have bigger analog gain), and the transformator that connect MT8888 with PSTN-line.

Gee..looks like I already change everything except the board :p But I still got zeroes in the reading.

Does anybody have had the same problem ? Could you share it to me ?

I would be very thankful for some infos...

Reply to
kunil
Loading thread data ...
[Snipped]
[Snipped]

RS0, CS and RD signals must be low when reading the data. I have used this IC with an AT90S8515 device without problems, so the ATMega8535 should be fine.

Regards Anton Erasmus

Reply to
Anton Erasmus

Yes, I did. I already make them low (RS0, CS, RD), following the datasheet.

Do you add some delay after make RS0, CS, RD low, before reading the result ? How much delay that's needed ? I already try to poll the result, but I get 0x0 too.

Can I see some code snippets on reading MT8888 :p If you dont mind of course.

Thank you

-kunil

Ant> RS0, CS and RD signals must be low when reading the data. I have used

Reply to
kunil

I would gladly share my source if I could find it. I did a simple project with the MT8888 and STK200 right after the STK200 became available, but at the moment I cannot find the source. I will have to go through my backup archives to find it.

To check if delays are necessary you can add getchar() calls in between each step of your access, where the getchar routines waits for a character from the serial port. You can then use a terminal program, press a key to advance to the next part of your access cycle. You should be able to use a multimeter to check if the right data appears.

Regards Anton Erasmus

Reply to
Anton Erasmus

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.