Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[Circuit][Program][Not tested] Program atMega 164

Status
Not open for further replies.
If you know hat a DTMF decoder is, you should be able to understand the circuit operation. You are pressing a key on the telephone dial to switch a particular relay on or off...
 

If you know hat a DTMF decoder is, you should be able to understand the circuit operation. You are pressing a key on the telephone dial to switch a particular relay on or off...
See the,circuit is understandable.

Some.how the c language used in the coding is not being understood by me.
 

If you ignore the LCD display part, which is for informational purposes only, you'll see, that the code is mainly reacting on the level changes of the DTMF outputs. The coding style isn't applying for a brilliancy prize, but understandable though. You need to get familiar with common methods of masking port bits and similar stuff.
 

The code seems to be using avrgcc but the included delay routines in <util/delay.h> are _delay_ms() and _delay_us() (avr-libc: <util/delay.h>: Convenience functions for busy-wait delay loops).

I don't see any macro to translate the Delay() to any of the above functions, are you able to compile the code?
Maybe the Delay() function is defined in the LCD library but in that case why is the delay.h included in the main file where it is never used(it will be ignored by the compiler anyway if no function is used but still...)?

For bitwise operations you can read a guide like View topic - [TUT] [C] Bit manipulation (AKA "Programming 101") :: AVR Freaks

Alex
 

The timing unit of Delay() is an interesting detail, but not essential to understand the code operation, I think. Assuming either µs or instruction cycles won't change the order of magnitude that much.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top