system clock: interal RC osc. 8MHz/1 = 8 MHz (lfuse=0xe2) My SC1602BS*B LCD : HD44780 compatible LCD-PIN mega48(solderless board) 2 VSS (GND) 1 VDD (VTG) 3 VO GND(0v)~5v (Infact when V0 > 1.8v, nothing can be seen.) 4 RS PB0 5 RW PB6 6 E PB7 7 B0 GND 8 B1 GND 9 B2 GND 10 B3 GND 11 B4 PC0 12 B5 PC1 13 B6 PC2 14 B7 PC3 4x4 Keypad: column1 --> PD0 column2 --> PD1 column3 --> PD2 column4 --> PD3 row1 --> PD4 row2 --> PD5 row3 --> PD6 row4 --> PD7 DTMF output: 1) if connect like this:(NO RC lowpass filter) (ATTENTION! IF OC1A connect a speaker(without amplifier), DTMF decoder cannot detect signal.) PB1(OC1A) | | v DTMF DECODER CIRCUIT INPUT(LC7385) the LC7385 seems decode well(without problem), but the waveform (by oszifox) is rect wave. 2) if connect like this:(with a RC lowpass filter) (ATTENTION! IF OC1A connect a speaker, or a speaker connected through the RC fliter(the sound is very weak), DTMF decoder cannot detect signal.) PB1(OC1A)--->/\/\/\/\(R)----| |(C)--->GND | | | v DTMF DECODER CIRCUIT INPUT(LC7385) R= 1K ohm, 560 ohm or 470 ohm C=100 nF (104) will generate DTMF wave fine, and can be decoded well by LC7385. 3) DON'T CONNECT like the following, just for test! if connect like this:(without RC fliter but through a amplifier.) this way can generate dtmf sounds (not strong, just can be heard) but the dtmf decoder CAN NOT decode well, sometimes will fail to decode!!! but the wave is rect. SPEAKER+ | |----------->DTMF DECODER -- CIRCUIT C=220uF INPUT(LC7385) -- | | /--/\/\/\/\(100)---VTG PB1(OC1A)--->/\/\/\/\(1K)--| \-->GND --- note: RC lowpass calc: F_cutoff=1/(2*pi*R*C) ---
Instead of schematics, source code also contains hardware informations
and technical notes, please read it for details.