Anda di halaman 1dari 5

SOFTWARE DESCRIPTION

The software requirements for the project are: 1. Embedded C programming for AVR controller. 2. CODEVISION AVR for programming microcontroller ATMEGA8535 3. PROTEUS for simulation of the circuit.

EMBEDDED C PROGRAMMING:
Embedded systems programming is different from developing applications on a desktop computers. Key characteristics of an embedded system, when compared to PCs, are as follows: Embedded devices have resource constraints (limited ROM, RAM, and stack space, less processing power) Components used in embedded system and PCs are different; embedded systems typically uses smaller, less power consuming components. Embedded systems are more tied to the hardware.

Two salient features of Embedded Programming are code speed and code size. Code speed is governed by the processing power, timing constraints, whereas code size is governed by available program memory and use of programming language. Goal of embedded system programming is to get maximum features in minimum space and minimum time. Embedded software needs to include all needed device drivers at manufacturing time, and the device drivers are written for the specific hardware. Embedded systems are programmed using different type of languages: 1. 2. 3. 4. Machine Code Low level language, i.e., assembly High level language like C, C++, Java, Ada, etc. Application level language like Visual Basic, scripts, Access, etc.

Assembly language maps mnemonic words with the binary machine codes that the processor uses to code the instructions. However, use of assembly language is restricted to developing efficient codes in terms of size and speed. As assembly language programs are specific to a processor, assembly language didnt offer portability across systems. Developing small codes are not much of a problem, but large programs/projects become increasingly difficult to manage in assembly language. Finding good assembly programmers has also become difficult nowadays. Hence high level languages are preferred for embedded systems programming. To overcome this disadvantage, several high level languages, including C, came up. Amongst those, C got wide acceptance for not only embedded systems, but also for desktop

applications. Various kinds of support tools like compilers & cross-compilers, ICE, etc. came up and all this facilitated development of embedded systems using C. Use of C in embedded systems is driven by following advantages 1. It is small efficient and reasonably simpler to learn, understand, program and debug. 2. C Compilers are available for almost all embedded devices in use today, and there is a large pool of experienced C programmers. 3. Unlike assembly, C has advantage of processor-independence and is not specific to any particular microprocessor/ microcontroller or any system. This makes it convenient for a user to develop programs that can run on most of the systems. 4. As C combines functionality of assembly language and features of high level languages, C is treated as a middle-level computer language or high level assembly language 5. It supports access to I/O and provides ease of management of large embedded projects. Though C and embedded C appear different and are used in different contexts, they have more similarities than the differences. Most of the constructs are same; the difference lies in their applications. C is used for desktop computers, while embedded C is for microcontroller based applications. Accordingly, C has the luxury to use resources of a desktop PC like memory, OS, etc. While programming on desktop systems, we need not bother about memory. However, embedded C has to use with the limited resources (RAM, ROM, I/Os) on an embedded processor. Thus, program code must fit into the available program memory. If code exceeds the limit, the system is likely to crash. Compilers for C (ANSI C) typically generate OS dependent exes. Embedded C requires compilers to create files to be downloaded to the microcontrollers/microprocessors where it needs to run. Embedded compilers give access to all resources which is not provided in compilers for desktop computer applications. Embedded systems often have the real-time constraints, which is usually not there with desktop computer applications. Embedded C use most of the syntax and semantics of standard C, e.g., main () function, variable definition, data type declaration, conditional statements (if, switch. case), loops (while, for), functions, arrays and strings, structures and union, bit operations, macros, unions, etc. In addition, there are some specifics to embedded C which are mentioned below: 1. 2. 3. 4. 5. 6. 7. Low Level Codes In-line Assembly Code Features like Heap, recursion I/O Registers Memory Pointers Bit Access Use of Variable data type

8. Use of Const and Volatile

CODEVISION AVR:
CodeVisionAVR is a complete set of tools designed for rapid and efficient software development for the Atmel AVR microcontrollers. CodeVisionAVR is the only IDE on the market that features an Automatic Program Generator (CodeWizardAVR) for the new ATxmega devices AT94K10/20/40 FPSLIC devices and the STK94 development kit and the only C compiler that supports the reduced core (ATtiny4, ATtiny5, ATtiny9, ATtiny10, ATtiny20, ATtiny40) chips. Main features: Editor with auto indentation, syntax highlighting for both C and AVR assembler, function parameters and structure/union members autocomplete. High performance ANSI C compiler with specific extensions that greatly simplify embedded system design: 1. Simple accessing of the EEPROM memory area, allows you to directly place there any variable, even complex structures 2. Simple accessing of the FLASH memory area, allows you to directly place there any constant, even complex structures 3. Bit level access to I/O registers, Interrupt support, GPIOR register support. 4. Possibility to insert assembler code directly in the C source file 5. VERY EFFICIENT USE OF RAM: Constant character strings are stored only in FLASH memory and aren't copied to RAM, like in other compilers for the AVR 6. C Source level debugging, with COFF symbol file generation, allows variable watching in Atmel's AVR Studio Debugger 7. Fully compatible with Atmel's In-Circuit Emulators TINY (8 bit data pointers for chips with up to 256 bytes of RAM) SMALL (16 bit data pointers for chips with > 256 bytes of RAM) MEDIUM (for chips with 128k of FLASH) LARGE (for chips with 256k or more FLASH). 8. The MEDIUM and LARGE memory models allow full FLASH addressing for chips like ATmega128, ATmega1280, ATmega2560, etc., the compiler handling the RAMPZ register totally transparently for the programmer. a. SPI, CAN and USB Interface, TWI , I2C Bus and ADC initialization b. LM75 Temperature Sensor, DS1621 Thermometer/Thermostat initialization c. PCF8563, PCF8583, DS1302, DS1307 Real Time Clocks initialization d. 1 Wire Bus and DS1820/DS1822 Temperature Sensors initialization e. Alphanumeric LCD module initialization. 9. A built-in Terminal for debugging RS232, RS422, RS485 serial communication.

10. An In-System AVR Chip Programmer compatible with the following development boards/programmers: Atmel STK500, STK600, AVRISP, AVRISP MkII (USB), JTAGICE MkII, AVR Dragon Kanda Systems STK200+ and STK300 Dontronics DT006 Vogel Elektronic VTEC-ISP.

PROTEUS:
Proteus is software for microprocessor simulation, schematic capture, and printed circuit board (PCB) design. It is developed by Lab center Electronics. The XGameStation Micro Edition was designed using Labcenter's Proteus schematic entry and PCB layout tools. The Proteus Design Suite is wholly unique in offering the ability to co-simulate both high and low-level micro-controller code in the context of a mixed-mode SPICE circuit simulation. System components: i) ISIS Schematic Capture (a tool for entering designs) : ISIS lies at the heart of the Proteus system, and is far more than just another schematics package. It combines a powerful design environment with the ability to define most aspects of the drawing appearance. Whether your requirement is the rapid entry of complex designs for simulation and PCB layout, or the creation of attractive schematics for publication, ISIS is the tool for the job. ii) PROSPICE Mixed mode SPICE simulation: Industry standard SPICE3F5 simulator combined with a digital simulator, Proteus PCB design combines the ISIS schematic capture and ARES PCB layout programs to provide a powerful, integrated and easy to use suite of tools for professional PCB Design. iii) ARES PCB Layout : PCB design system with automatic component placer, rip-up and retry autorouter and interactive design rule checking. All Proteus PCB design products include an integrated shape based autorouter and a basic SPICE simulation capability as standard. More advanced routing modes are included in Proteus PCB Design Level 2 and higher whilst simulation capabilities can be enhanced by purchasing the Advanced Simulation option and/or micro-controller simulation capabilities. iv) VSM : Virtual System Modelling lets simulate embedded software for popular microcontrollers alongside hardware design. With this Virtual System Modelling facility, you can transform your product design cycle, reaping huge rewards in terms of reduced time to market and lower costs of development. Proteus VSM was the first product to bridge the gap between schematic and PCB for embedded design, offering system level simulation of microcontroller based designs inside the schematic package itself. Over ten years later, Proteus VSM is still leading the field with more microcontroller variants and peripherals than any competing product, better debugging tools and instruments and a consistent focus on innovation.

v) System Benefits : Integrated package with common user interface and fully context sensitive help.

Data Received Slno.


1 2 3 4 5 6

Switch no.
S1 S2 S3 S4 S5 S6

D0
0 1 1 1 0 1

D1
1 0 1 1 0 0

D2
1 1 0 1 1 0

D3
1 1 1 0 1 1

Task
Light ON/OFF Light intensity Increase Light intensity decrease Fan ON/OFF Fan speed increase Fan speed decrease

Anda mungkin juga menyukai