From: kunil on
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 <LOW> 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...

From: Anton Erasmus on
On 25 Jul 2005 05:10:43 -0700, "kunil" <kunilkuda(a)gmail.com> wrote:


[Snipped]
>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 <LOW> 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.
>
[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

From: kunil on

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

Anton Erasmus wrote:
> On 25 Jul 2005 05:10:43 -0700, "kunil" <kunilkuda(a)gmail.com> wrote:
> 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

From: Anton Erasmus on
On 25 Jul 2005 17:56:37 -0700, "kunil" <kunilkuda(a)gmail.com> wrote:

>
>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.

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

 | 
Pages: 1
Prev: EasyAVR problem
Next: Free FAT16 Filesystem