Burglar Alarm Final Report

Size: px
Start display at page:

Download "Burglar Alarm Final Report"

Transcription

1 Burglar Alarm Submitted By: Brandon Maciel, Linda Thompson, Bradford Savage ETEE3255 Lab VII Instructor: Barry Sherlock Date Due: November 18 th, 2010

2 Abstract 1 The purpose of this project was to design, build, and test a burglar system. Using simulation software and a programming code that was made to control operation of the system via a microcontroller. A user interface was designed that will enabled the user to manipulate several functions, such as arming/disarming the system and turning particular sensors on or off. In order to demonstrate practical user implementation of the burglar alarm system, the programming code was implemented with a visual interface, a LCD display unit and a keyboard. The system was tested by triggering various sensors, mostly magnetic switches, which were connected to the microprocessor. Successful operation of the project was done by proper programming code, user interface, and sensor compatibility while undergoing random presentation testing. The team as a whole cumulatively worked on all paperwork of the project, testing the system, designing the programming code, and building an interface for burglar alarm system.

3 1. History of the Burglar Alarm 2 Home safety is a key concern among many homeowners. The burglar alarm system provides an added sense of security when just locking the doors is not gratifying enough. This need for household security is a concern that dates back to the 19 th Century. The electric burglar alarm system has been around since the mid 1800s. The first electric burglar alarm system was invented in Boston, MA, by Edwin Holmes in It consisted of a tripwire that electrically powered a solenoid which struck a gong when it was set off. Holmes then turned his system into a business and moved to New York. When in New York the American Telephone and Telegraph Company (AT&T) bought the company from Holmes. Once bought, AT&T hooked all the personal burglar alarms up to the same grids as those aligned with the police and fire department. This let the police or fire department know when somebody was breaking into a house or if there was a fire. In the 1970s the burglar alarm system evolved to have motion detectors installed with each system that was set up. The following decade brought about the introduction of infrared sensors, which contributed to the overall efficacy of the alarm system. Now burglar alarm systems are in the majority of homes across America. With the advent of more intricate and well-developed technologies, burglar alarms have now become equipped with a device that allows the owner to arm or disarm the security system from his or her cellular device or laptop. As time progresses, so too does the vastness of the range of capabilities of the alarm system. In today s world, individuals are able to monitor the safety of their children, homes, and priceless belongings with the use of video surveillance. The burglar alarm system has now become less expensive and

4 3 more advanced than ever before giving households everywhere the sense of safety and security they have been yearning to attain for centuries on end. 2. Review of Current Literature Many burglar alarms on the market today are either overpriced or are not dependable. While the more expensive alarm systems are dependable with sound engineering, they are simply too expensive for most people. On the other hand, less expensive alarm systems are simply not dependable enough. The cost of competitive alarm systems the team analyzed varied from $99.95 $ This project has tackled both of these with the goal of designing a less expensive, fully dependable alarm system. Advanced Technology Solutions has a tech savvy, high priced alarm system for $ Their product consists of 2 x 1/3 inch SONY Super HAD CCD Cameras and 1 x 4-Channel Digital Video Recorder (DVR). The wide angle cameras have built in infrared sensors that serve 2 purposes: video surveillance and motion detecting. Coupled with the DVR, this system is state of the art with an almost fool-proof dependability scenario. Although the Advanced Technology Solutions system has one major flaw; it is priced too high for the average consumer. Wireless Home has a less expensive solution priced at $ While the price is right for the average consumer, this system lacks dependability as it contains only 1 infrared sensor and 2 magnetic window sensors. This obvious lack of security is unacceptable for most consumers, considering most home have 10 sets of windows and two doors.

5 4 The fact that one has to buy warning signs and decals separately might lead the consumer to the conclusion that the company has trimmed all costs to provide a great deal. But with minimal experience in commercial sensor pricing, this product is also drastically overpriced, although touted as a great deal. The purpose of this project is to deliver a reasonably priced, dependable alarm system. After analyzing the competition, the projects 14 sensor array will provide beefed-up security than even the more expensive systems. More sensors simply equal more security. Finding dependable sensors will be a tough task for the project, but once reasonably priced sensors have been found, accomplishing the low-cost goal will be within reach. 3. Experimental Method A program was written that simulated a basic house burglary alarm system. This alarm system was able to detect when there was an intrusion through any door, window, or garage door. Also there was an LCD screen which displayed the alarm status along with a 16-bit hexadecimal keypad that helped navigate through the LCD screen. The house consisted of sensors on all windows and doors. There had to be at least six window sensors, two garage door sensors, and two regular door sensors. In addition to the sensors it was required that there be four either infrared motion detectors. The

6 5 motion detectors detected motion throughout the house. The program that was written was a link to all switches and infrared detectors to the AVR ATMEGA 128. After the sensors and infrared detectors were set up, a user interface was created to display on the LCD screen. The 16-bit hexadecimal keypad was used to navigate through the LCD screen. The user interface had four different modes the user could choose from. There were the Setup, Arm, Disarm, and Status modes to select from. The screens looked similar to the figure below. S Y S T E M S T A T U S 1 0 / 2 0 / : 3 0 A M A S L A R M M O D E : A R M E T A T U S : S E C U R E D Fig. 1 Display Screen The Setup mode was used initially to set up the time, date and a five-digit disarm code. After the setup was complete the alarm system started monitoring the sensors and infrared detectors. The system then went into status mode. The status mode gave the current situation at each sensor and infrared detector. To arm the alarm system the user selected alarm mode and this mode set the system in arm mode. All sensors and detectors were secure before the system was armed. Once the system was armed there was a 45-second wait period to allow the family to leave the house without tripping the alarm. If the alarm had been tripped after the initial 45-seconds then an alarm would go off to signify that an intruder was in the building. The alarm system would then go into the disarm mode. In disarm mode it allowed the individual 45 seconds to

7 6 disarm the alarm with the five digit disarm code after it has been tripped. When the alarm system was not armed there was the main screen where the user could select between all four modes by push button. The push buttons had to be hardware debounced in order for them to work properly. This was done by using capacitors and resistors between the switch and AVR connection. All equipment required is shown on Table 1 shown below. Requirements Usage AVR ATMEGA 128 4x20 LCD Screen Microcontroller used User interface screen 16 Button Hexadecimal Keypad Type to LCD screen 6 Sensors 2 door, 6 window, 2 garage door 4 Infrared motion/beam detectors Detect motion or intrusion RS 232 Serial Communication Terminal Communicate with AVR ATMEGA user interface modes Setup, Arm, Disarm, Status Table I: Equipment Requirements

8 4. Program Code 7 The program code was written piece by piece. The first important piece of the code was to initialize the ports being used. Port A was initialized to be the sensors for the windows and doors. Port D was initialized to communicate with the Keypad. Port E was initialized to communicate with the LCD screen. Finally Port F was used to initialize the motion sensors. // Port A initialization PORTA=0x00;//port for window and door sensors DDRA=0xFF;//0-3 for windows and 4-7 for door sensors // Port D initialization PORTD=0x0F; //Port for the keypad DDRD=0xF0; //Upper 4-bits are output and lower 4-bits are inputs // Port E initialization PORTE=0x00; //Port for the LCD DDRE=0xFC; //Pins 2-7 are outputs for LCD // Port E initialization PORTF=0x00; DDRF=0xFF; sensors //Port for the motion sensors //Pins 0-1 for door sensors and 2-5 for motion Fig 2. Code initializing Ports The second piece of code that was a major portion was telling the LCD screen what to display. The LCD screen is how the user communicates with the burglar alarm system. So what is shown on the display screen is important so the user can navigate through the screens without any problems. An example of this code is displayed below in figure three.

9 8 //Text used for Set-up Screen unsigned char setup_screen0[21] = (" SYSTEM SETUP ");//press A for setup unsigned char setup_screen1[21] = (" ARM ");//press B for Arm--45 seconds to leave and ALL sensors armed unsigned char setup_screen2[21] = (" DISARM ");//press C for disarm--45 seconds to enter correct 5 DIGIT code unsigned char setup_screen3[21] = (" STATUS ");//press D for Sensor Status Screen Fig 3. LCD Screen Display The last portion of the code was setting up the sensors to communicate when a door or window was being opened/close. This part of the code tells the ATmega 128 to communicate with the sensors see if the doors or windows are opened or closed. If they are closed then the system does not do anything, but if the sensors detect a open door or window it will then notify the ATmega 128 that there has been a breech in the house. // updates alarm triggers on sensor status screen via an array void UpdateSensorStatus () if(pina.7==1)sensor_screen3[10]='-';else sensor_screen3[10]='a'; if(pina.6==1)sensor_screen3[9]='-';else sensor_screen3[9]='a'; if(pina.5==1)sensor_screen3[8]='-';else sensor_screen3[8]='a'; if(pina.4==1)sensor_screen3[7]='-';else sensor_screen3[7]='a'; if(pina.3==1)sensor_screen3[5]='-';else sensor_screen3[5]='a'; if(pina.2==1)sensor_screen3[4]='-';else sensor_screen3[4]='a'; if(pina.1==1)sensor_screen3[3]='-';else sensor_screen3[3]='a'; if(pina.0==1)sensor_screen3[2]='-';else sensor_screen3[2]='a'; if(pinf.7==1)sensor_screen3[18]='-';else sensor_screen3[18]='a'; if(pinf.6==1)sensor_screen3[17]='-';else sensor_screen3[17]='a'; if(pinf.5==1)sensor_screen3[16]='-';else sensor_screen3[16]='a'; if(pinf.4==1)sensor_screen3[15]='-';else sensor_screen3[15]='a'; if(pinf.3==1)sensor_screen3[12]='-';else sensor_screen3[12]='a';

10 if(pinf.2==1)sensor_screen3[11]='-';else sensor_screen3[11]='a'; Fig 4. Setting Up Sensors 9 The rest of the code set up the time and date, and also linked the major parts of the code together. The switches on the ATmega128 were simulations of the sensor for the burglar alarm system. When the sensor was set to high then the door/window was closed. When it was set to low the door/window was opened. 5. Experimental Results While writing the program, there were several issues that had to be dealt with before we got the code working. The first problem was trying to find which port to use for the LCD screen. The LCD screen has its own slot on the ATmega 123 but it does not show what port it was. After a great deal of research it was found that port E was needed to work the LCD screen. Once the right port was initialized for the LCD screen there was also trouble trying to get the screen display what was desired for it to display. The screen would just show blocks across the entire screen. It took a lot of trial and error to finally get the LCD displaying what it needed to display.

11 10 Setting up the Date and Time in the system setup also took a lot longer than planned in the original work breakdown structure. Through research on the internet about different commands in the C programming language finally gave a solution on how to fix the problems encountered with setting up the time and date for the burglar alarm system. Overall the parts completed from the objectives performed to expectations. There was a problem getting infrared motion detectors so there was no way to check the code written to see if it worked. Also switches were used in the place of the sensors for the doors and windows. If the switch read high then the door/window was closed, and if the switch read low then the door/window was open. 6. Conclusion The objective of this project was to create a model burglar alarm system that would detect motion and the opening of all doors and windows when the system is armed. The system should have a LCD screen that allowed you to setup, arm, disarm, and check the status of the alarm system. A keypad was also needed to navigate through the LCD screen. There had to be a total of six window sensors, four door sensors (two regular doors and two garage doors), and four motion detectors.

12 11 The greatest challenge faced in this project was writing and debugging the code to get it to operate correctly. There were several problems in the code that had to be fixed before it would work correctly. A few of the main problems corrected were assigning the right port to the LCD screen (Port E), getting the LCD screen to display correctly, and getting the time and date to set up correctly. Overall the parts of the objectives that were completed worked correctly as the objectives specified. Although infrared motion detectors could not be obtained, code was still written to include them. 7. References Atomic Mall product Info- Wireless Home -Business Security Burglar Alarm System. Web.< Dino Direct- Advanced Technology Solutions 4 Channel DVR & 2 Color Cameras Security System. Web.<

13 Amtel Products- AVR ATMEGA 128. Web. <

14 8. Appendix 13 Appendix 1. Project Guidelines

15 14

16 15

17 16 Appendix 2. Complete Code **************************************** This program was produced by the CodeWizardAVR V Evaluation Automatic Program Generator Copyright Pavel Haiduc, HP InfoTech s.r.l. Project : Brandon, Linda, and Bradford Version : 1 Date : 11/16/2010 Author : Freeware, for evaluation and non-commercial use only Company : Comments:

18 17 Chip type : ATmega128L Program type : Application AVR Core Clock frequency: MHz Memory model : Small External RAM size : 0 Data Stack size : 1024 *****************************************************/ #include <mega128.h> #include <delay.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #define FIRST_ADC_INPUT 0 #define LAST_ADC_INPUT 0 unsigned char adc_data[last_adc_input-first_adc_input+1]; #define ADC_VREF_TYPE 0xE0 #define LCD_PORT PORTE //LCD connected to Port E #define LCD_RS 0x04 //LCD Register Select 0=Instruction input, 1=Data input #define LCD_EN 0x08 //LCD Enable bit #define TRUE 0 #define FALSE 1 #define door1 #define door2 #define door3 #define door4 #define window_1 #define window_2 #define window_3 #define window_4 PORTA.0 PORTA.1 PORTA.2 PORTA.3 PORTA.4 PORTA.5 PORTA.6 PORTA.7 #define window_5 #define window_6 #define sensor_1 #define sensor_2 #define sensor_3 #define sensor_4 PORTF.0 PORTF.1 PORTF.2 PORTF.3 PORTF.4 PORTF.5 //Declared variables void intsetup (); void InputData1 (); char button (char keycode); void SensorScreen (); void MainMenu(); void MainMenu2(); void zone_set_up(); unsigned long GetCurrentDate(); unsigned long GetCurrentTime(); void clock ();

19 18 // Timer 0 overflow interrupt service routine interrupt [TIM0_OVF] void timer0_ovf_isr(void) // Reinitialize Timer 0 value TCNT0=0x06; clock (); // ADC interrupt service routine // with auto input scanning interrupt [ADC_INT] void adc_isr(void) static unsigned char input_index=0; // Read the 8 most significant bits // of the AD conversion result adc_data[input_index]=adch; // Select next ADC input if (++input_index > (LAST_ADC_INPUT-FIRST_ADC_INPUT)) input_index=0; ADMUX=(FIRST_ADC_INPUT (ADC_VREF_TYPE & 0xff))+input_index; // Delay needed for the stabilization of the ADC input voltage delay_us(10); // Start the AD conversion ADCSRA =0x40; unsigned char lcd_x; //X position of the LCD screen unsigned char lcd_y; //Y position of the LCD screen static unsigned char base_y[4] = 0x80, 0xC0, 0x94, 0xD4; //Array for the y positions on the LCD unsigned char a; unsigned long current_time; void LCD_reset () LCD_PORT = LCD_EN; LCD_PORT = 0x30 LCD_EN; LCD_PORT = 0x30; delay_ms (1); LCD_PORT = LCD_EN; LCD_PORT = 0x30 LCD_EN; LCD_PORT = 0x30; delay_ms (1); LCD_PORT = LCD_EN; LCD_PORT = 0x30 LCD_EN; LCD_PORT = 0x30; delay_ms (1); LCD_PORT = LCD_EN; LCD_PORT = 0x20 LCD_EN; LCD_PORT = 0x20; delay_ms (1); //Reset the LCD //Enable the LCD //Routine used for reseting the LCD //Routine repeated //Routine repeated //Sets the Bus width of 4-bit mode

20 void lcd_cmd (unsigned char cmd) //send high bits LCD_PORT = LCD_EN; LCD_PORT = (cmd & 0xF0) LCD_EN; makes EN low LCD_PORT = (cmd & 0xF0); //send low bits LCD_PORT = LCD_EN; LCD_PORT = ((cmd << 4) & 0xF0) LCD_EN; LCD_PORT = ((cmd << 4) & 0xF0); makes EN low delay_ms (5); process the command 19 //Sending command to the LCD // makes EN high // Put on commands ports //Port retains the command // makes EN high //Shifts to upper 4 bits // Put on commands ports //Delay to give LCD time to void LCD_init() //Initializes the LCD LCD_reset(); lcd_cmd (0x28); //4-bit, 2 line, 5x7 dots lcd_cmd (0x0C); //Display on Cursor off lcd_cmd (0x06); //Entry Mode lcd_cmd (0x01); //Clears the Screen lcd_cmd (0x80); // Set Cursor at line 1 //Set the LCD display position x=0...39, y=0...3 void lcd_gotoxy (unsigned char x, unsigned char y) lcd_cmd (base_y [y] + x); lcd_x = x; lcd_y = y; /*void lcd_senddata (unsigned char data) //Write one character to LCD //send high bits LCD_PORT = LCD_EN LCD_RS; // Allow data to be sent to LCD LCD_PORT = ((data & 0xF0) LCD_EN LCD_RS); //Write the data to the LCD LCD_PORT = ((data & 0xF0) LCD_RS); // Put on commands ports makes EN low //send low bits LCD_PORT = LCD_EN LCD_RS; // makes EN high LCD_PORT = (((data << 4 ) & 0xF0) LCD_EN LCD_RS); LCD_PORT = (((data << 4) & 0xF0) LCD_RS); //Puts data on the LCD delay_ms (5); process */ void lcd_displaystring (unsigned char *var) LCD unsigned char current_char; while (*var!= 0) current_char = *var++; //Give LCD time to //Display a string on the

21 20 //send high bits LCD_PORT = LCD_EN LCD_RS; // makes EN high and RS high to write to LCD LCD_PORT = ((current_char & 0xF0) LCD_EN LCD_RS); LCD_PORT = ((current_char & 0xF0) LCD_RS); // Put on commands ports makes EN low //send low bits LCD_PORT = LCD_EN LCD_RS; // makes EN high LCD_PORT = (((current_char << 4 ) & 0xF0) LCD_EN LCD_RS); LCD_PORT = (((current_char << 4) & 0xF0) LCD_RS); //Puts string on the LCD delay_ms (5); //Give LCD time to process //Text used for System Status Screen unsigned char system_screen0 [21] = (" SYSTEM STATUS "); // system status screen unsigned char system_screen1 [21] = (" "); // time date display---00:00 00/00/00 unsigned char system_screen2 [21] = (" ALARM MODE: "); // armed or disarmed unsigned char system_screen3 [21] = (" STATUS: "); //secure or insecure armed or disarmed //Text used for the Sensor Status Screen

22 21 unsigned char sensor_screen0 [21] = (" SENSOR STATUS "); // sensor status screen unsigned char sensor_screen1 [21] = (" DOOR WINDOW MOTION ");//type or location of sensor unsigned char sensor_screen2 [21] = (" ");//sensor #'s unsigned char sensor_screen3 [21] = (" ");//A= tripped, N= nominal //Text used for Set-up Screen unsigned char setup_screen0[21] = (" SYSTEM SETUP ");//press A for setup unsigned char setup_screen1[21] = (" ARM ");//press B for Arm--45 seconds to leave and ALL sensors armed unsigned char setup_screen2[21] = (" DISARM ");//press C for disarm--45 seconds to enter correct 5 DIGIT code unsigned char setup_screen3[21] = (" STATUS ");//press D for Sensor Status Screen ////Text used for Initial Set-up Screen unsigned char isetup_screen0[21] = (" ENTER TIME ");//press A for setup unsigned char isetup_screen1[21] = (" 00:00 ");//press B for Arm--45 seconds to leave and ALL sensors armed unsigned char isetup_screen2[21] = (" Enter DATE ");//press C for disarm--45 seconds to enter correct 5 DIGIT code unsigned char isetup_screen3[21] = (" 00/00/00 ");//press D for Sensor Status Screen unsigned char code1[21] = (" ENTER CODE "); unsigned char arm_disarm1[21] = ("ARM = 1 DISARM = 2 "); unsigned char c = 0; unsigned char temperature_data; int clock_hours; int time_counter;

23 int clock_seconds; int clock_minutes; int date_dd; int date_mm; int date_yy; 22 unsigned char ZZ = 0; int arm; int code_a; int code_b; int code_c; int code_d; int code_e; int decide; int status; void main(void) // Port A initialization PORTA=0x00;//port for window and door sensors DDRA=0xFF;//0-3 for windows and 4-7 for door sensors // Port D initialization PORTD=0x0F; //Port for the keypad DDRD=0xF0; //Upper 4-bits are output and lower 4-bits are inputs // Port E initialization PORTE=0x00; //Port for the LCD DDRE=0xFC; //Pins 2-7 are outputs for LCD // Port E initialization

24 PORTF=0x00; DDRF=0xFF; 23 //Port for the motion sensors //Pins 0-1 for door sensors and 2-5 for motion sensors // Timer/Counter 0 initialization // Clock source: System Clock // Clock value: khz // Mode: Normal top=ffh // OC0 output: Disconnected ASSR=0x00; TCCR0=0x04; TCNT0=0x06; OCR0=0x00; // ADC initialization // ADC Clock frequency: khz // ADC Voltage Reference: Int., cap. on AREF // Only the 8 most significant bits of // the AD conversion result are used ADMUX=FIRST_ADC_INPUT (ADC_VREF_TYPE & 0xff); ADCSRA=0xCC; delay_ms(1000); LCD_init(); //Initialize LCD MainMenu(); // Timer(s)/Counter(s) Interrupt(s) initialization TIMSK=0x01; ETIMSK=0x00; // Global enable interrupts #asm("sei") intsetup();// calls up int set up initially

25 24 while (1) keydata1 = PIND & 0x0F; if ((keydata1!= 0xF) & ZZ==0) delay_ms (5); keydata2 = PIND & 0x0F; if (keydata1 == keydata2) and put in a variable ZZ=1; key_select = button(keydata2); //Takes data from keypad if((keydata1 == 0xF) & ZZ==1) ZZ=0; current_time = GetCurrentTime(); system_screen1[2]=(clock_hours/10)+0x30; system_screen1[3]=clock_hours%10+0x30; system_screen1[4]=':'; system_screen1[5]=clock_minutes/10+0x30; system_screen1[6]=clock_minutes%10+0x30; system_screen1[7]='_'; current_date = GetCurrentDate(); system_screen1[8]=(date_mm/10)+0x30; system_screen1[9]=date_mm%10+0x30; system_screen1[10]=(date_dd/10)+0x30; system_screen1[11]=date_dd%10+0x30; system_screen1[12]=(date_yy/10)+0x30; system_screen1[13]=date_yy%10+0x30; //was a semicolon here??

26 25 void SatusMenu()// tells what status menu displays lcd_cmd (0x01); lcd_gotoxy(0,0); lcd_displaystring (setup_screen0); lcd_gotoxy (0,1); lcd_displaystring (setup_screen1); lcd_gotoxy (0,2); lcd_displaystring (setup_screen2); lcd_gotoxy (0,3); lcd_displaystring (setup_screen3); void SensorMenu()//defines sensor menu lcd_cmd (0x01); lcd_gotoxy(0,0); lcd_displaystring (system_screen0); lcd_gotoxy (0,1); lcd_displaystring (system_screen1); lcd_gotoxy (0,2); lcd_displaystring (system_screen2); lcd_gotoxy (0,3); lcd_displaystring (system_screen3); void intsetup()// tells what setup screen says lcd_cmd (0x01); lcd_gotoxy(0,0); lcd_displaystring (setup_screen0); lcd_gotoxy (0,1); lcd_displaystring (setup_screen1); lcd_gotoxy (0,1); lcd_displaystring (setup_screen2); lcd_gotoxy (0,2); lcd_displaystring (setup_screen3); InputData1();// inputs date and time clock_hours = key_select*10; InputData1();

27 clock_hours += key_select; InputData1(); clock_minutes = key_select*10; InputData1(); clock_minutes += key_select; 26 InputData1(); date_mm = key_select*10; InputData1(); date_mm += key_select; InputData1(); date_dd = key_select*10; InputData1(); date_dd += key_select; InputData1(); date_yy = key_select*10; InputData1(); date_yy += key_select; lcd_gotoxy (0,1); lcd_displaystring (enter_code); digit_code(); void digit_code()//5 digit code===1,2,3,4,5 InputData1(); code_a = key_select; if (code_a == 1); continue;

28 InputData1(); code_b = key_select; if (code_b == 2); continue; InputData1(); code_c = key_select; if (code_c == 3); continue; InputData1(); code_d = key_select; if (code_d == 4); continue; InputData1(); code_e = key_select; if (code_e == 5); continue; 27 lcd_gotoxy (0,2); lcd_displaystring (arm_disarm);// decide if arm or disarm InputData1(); decide = key_select; if (decide == 1); status = 1; UpdateSensorStatus();//armed and secure return; else if (decide == 2); status = 2; UpdateSensorStatus();//disarmed and secure return;

29 28 void SensorScreen ()// tells what sensor screen to say lcd_cmd (0x01); lcd_gotoxy (0,0); lcd_displaystring (sensor_screen0); lcd_gotoxy (0,1); lcd_displaystring (sensor_screen1); lcd_gotoxy (0,2); lcd_displaystring (sensor_screen2); lcd_gotoxy (0,3); lcd_displaystring (sensor_screen3); unsigned long GetCurrentTime() current_time = 60*(unsigned long)clock_hours + (unsigned long)clock_minutes; return current_time; unsigned GetCurrentDate() current_date = (unsigned)date_mm + (unsigned)date_dd + (unsigned)date_yy;

30 return current_date; 29 // clock counter function void clock () // internal counter increments each time the overflow interrupt occurs (every 1 msec) if (time_counter < 999) // Has it counted up to 1000 msec or 1 second (adjusted down to 999 to account for instruction cycle overhead)... time_counter++; // No?...keep counting else time_counter = 0; // Yes?...reset counter and... if(++clock_seconds == 60) // increment the seconds counter and check to see if we are ready to... clock_seconds = 0; // rollover the seconds counter from 60 to to zero and... if(++clock_minutes == 60) // increment the minutes counter and then check to see if we are ready to... clock_minutes = 0; // rollover the minutes from 60 to zero and... if(++clock_hours == 24)// increment the hours counter and check to see if we are ready to... clock_hours = 0; // rollover the hours from 24 to 00

31 30 // updates alarm triggers on sensor status screen via an array void UpdateSensorStatus () if(pina.7==1)sensor_screen3[10]='-';else sensor_screen3[10]='a'; if(pina.6==1)sensor_screen3[9]='-';else sensor_screen3[9]='a'; if(pina.5==1)sensor_screen3[8]='-';else sensor_screen3[8]='a'; if(pina.4==1)sensor_screen3[7]='-';else sensor_screen3[7]='a'; if(pina.3==1)sensor_screen3[5]='-';else sensor_screen3[5]='a'; if(pina.2==1)sensor_screen3[4]='-';else sensor_screen3[4]='a'; if(pina.1==1)sensor_screen3[3]='-';else sensor_screen3[3]='a'; if(pina.0==1)sensor_screen3[2]='-';else sensor_screen3[2]='a'; if(pinf.7==1)sensor_screen3[18]='-';else sensor_screen3[18]='a'; if(pinf.6==1)sensor_screen3[17]='-';else sensor_screen3[17]='a'; if(pinf.5==1)sensor_screen3[16]='-';else sensor_screen3[16]='a'; if(pinf.4==1)sensor_screen3[15]='-';else sensor_screen3[15]='a'; if(pinf.3==1)sensor_screen3[12]='-';else sensor_screen3[12]='a'; if(pinf.2==1)sensor_screen3[11]='-';else sensor_screen3[11]='a'; if(status = 1)// carried over from correct code entry system_screen2[13] ='A'; system_screen2[14] ='R'; system_screen2[15] ='M'; system_screen2[16] ='E'; system_screen2[17] ='D'; system_screen3[10]='s'; system_screen3[11]='e'; system_screen3[12]='c';

32 system_screen3[13]='u'; system_screen3[14]='r'; system_screen3[15]='e'; return; 31 else(status = 2)// carried over from correct code entry system_screen2[13] ='D'; system_screen2[14] ='I'; system_screen2[15] ='S'; system_screen2[16] ='A'; system_screen2[17] ='R'; system_screen2[18] ='M'; system_screen2[19] ='E'; system_screen2[20] ='D'; system_screen3[10]='i'; system_screen3[11]='n'; system_screen3[12]='s'; system_screen3[13]='e'; system_screen3[14]='c'; system_screen3[15]='u'; system_screen3[16]='r'; system_screen3[17]='e'; return;

33 32 void InputData1()// allows data to be input via keypad(decoder) key_select = 'ZZ'; while (key_select == 'ZZ') keydata1 = PIND & 0x0F; if ((keydata1!= 0xF) & ZZ==0) delay_ms (5); keydata2 = PIND & 0x0F; if (keydata1 == keydata2) key_select = button(keydata2); and put in a variable ZZ=1; if((keydata1 == 0xF) & ZZ==1) ZZ=0; //Takes data from keypad

34 char button(char keycode)// assigns screen options from the status screeen char keypressed; DDRD = 0x0F; PORTD = 0xF0; switch(keycode) case 0xE: PORTD = 0xFE; delay_ms(5); keycode = (PIND & 0xF0); switch(keycode) case 0xE0: keypressed =1; case 0xD0: keypressed =2; case 0xB0: keypressed =3; case 0x70: keypressed ='A'; intsetup();// case 0xD: PORTD = 0xFD; delay_ms(5); keycode = (PIND & 0xF0); switch(keycode) case 0xE0: keypressed =4; case 0xD0: keypressed =5; case 0xB0: keypressed =6; case 0x70: keypressed ='B'; //change_zone();// case 0xB: PORTD = 0xFB; delay_ms(5); keycode = (PIND & 0xF0); switch(keycode) case 0xE0: keypressed =7; case 0xD0: keypressed =8; 33

35 case 0xB0: keypressed =9; case 0x70: keypressed ='C'; // case 0x7: PORTD = 0xF7; delay_ms(5); keycode = (PIND & 0xF0); switch(keycode) case 0xE0: keypressed ='*'; MainMenu2 (); case 0xD0: keypressed =0; case 0xB0: keypressed ='#'; case 0x70: keypressed ='D'; SensorScreen ();// DDRD = 0xF0; //rows are outputs, cols are inputs PORTD = 0x0F; //pullup resistor for inputs, set outputs to low return (keypressed); 34

LAMPIRAN. Program Keseluruhan Sistem Pengontrolan Level Air

LAMPIRAN. Program Keseluruhan Sistem Pengontrolan Level Air LAMPIRAN Program Keseluruhan Sistem Pengontrolan Level Air /***************************************************** This program was produced by the CodeWizardAVR V2.03.4 Standard Automatic Program Generator

More information

Ali Karimpour Associate Professor Ferdowsi University of Mashhad

Ali Karimpour Associate Professor Ferdowsi University of Mashhad AUTOMATIC CONTROL SYSTEMS Ali Karimpour Associate Professor Ferdowsi University of Mashhad Reference: Microcontroller Based Applied Digital Control Dogan Ibrahim, John Wiley & Sons Ltd, 2006 Liquid Level

More information

LAMPIRAN. 1. Program Alat

LAMPIRAN. 1. Program Alat LAMPIRAN 1. Program Alat This program was produced by the CodeWizardAVR V2.03.4 Standard Automatic Program Generator Copyright 1998-2008 Pavel Haiduc, HP InfoTech s.r.l. http://www.hpinfotech.com Project

More information

RANGKAIAN LENGKAP. Universitas Sumatera Utara

RANGKAIAN LENGKAP. Universitas Sumatera Utara RANGKAIAN LENGKAP Lampiran Program /***************************************************** This program was produced by the CodeWizardAVR V1.25.8 Professional Automatic Program Generator Copyright 1998-2007

More information

Gambar A-1 Foto alat prototype infrared thermometer

Gambar A-1 Foto alat prototype infrared thermometer LAMPIRAN A Foto Alat Gambar A-1 Foto alat prototype infrared thermometer A-1 LAMPIRAN A A-2 LAMPIRAN A Daftar Komponen yang digunakan Komponen Aktif Nama komponen Fungsi Jumlah AVR ATMega 8535 Mikrokontroler

More information

Lampiran I. Rangkaian Lengkap Alat. Universitas Sumatera Utara

Lampiran I. Rangkaian Lengkap Alat. Universitas Sumatera Utara Lampiran I Rangkaian Lengkap Alat Lampiran II Program Pada Alat /***************************************************** This program was produced by the CodeWizardAVR V2.04.9 Evaluation Automatic Program

More information

LAMPIRAN A List Program CodeVision Generato Data...A-1 List Program CodeVision Multiplexer...A-11 List Program CodeVision Demultiplexer...

LAMPIRAN A List Program CodeVision Generato Data...A-1 List Program CodeVision Multiplexer...A-11 List Program CodeVision Demultiplexer... LAMPIRAN A List Program CodeVision Generato Data...A-1 List Program CodeVision Multiplexer...A-11 List Program CodeVision Demultiplexer...A-14 List Program Codevision Generator Data /****************************************

More information

LAMPIRAN A FOTO ALAT

LAMPIRAN A FOTO ALAT LAMPIRAN A FOTO ALAT Gambar A.1. Gambar robot mobil dilihat dari atas Gambar A.2. Gambar robot mobil dilihat dari depan Gambar A.3. Gambar robot mobil dilihat dari samping Gambar A.4. Gambar keseluruhan

More information

// WRITE data to be written to EEPROM

// WRITE data to be written to EEPROM /***************************************************** This program was produced by the CodeWizardAVR V2.03.9 Evaluation Automatic Program Generator Copyright 1998-2008 Pavel Haiduc, HP InfoTech s.r.l.

More information

Software Design Considerations, Narrative and Documentation

Software Design Considerations, Narrative and Documentation Software Design Considerations, Narrative and Documentation Introduction The project under consideration is an automated shopping cart designed to follow a shopper around a simulated supermarket environment.

More information

LAMPIRAN A. Foto Alat

LAMPIRAN A. Foto Alat LAMPIRAN A Foto Alat A-1 A-2 Rangkaian Skematik PCB Sistem Monitoring Infus A-3 LAMPIRAN B Program pada Mikrokontroller AVR Atmega16...B-1 Program pada Borlan Delhpi 7.0...B-9 PROGRAM UTAMA /*****************************************************

More information

How2Use DT-AVR ATMEGA128L BMS. Oleh: IE Team. Picture 1 The layout of DT-AVR ATMEGA128L BMS

How2Use DT-AVR ATMEGA128L BMS. Oleh: IE Team. Picture 1 The layout of DT-AVR ATMEGA128L BMS DT-AVR ATMEGA128L BMS Application Note Oleh: IE Team This Application Note (AN) serves as a tutorial of how to use the DT-AVR ATMEGA128L Bootloader Micro System along with its supplementary software. The

More information

Final Design Report. Team Name: No Rest for the Weary

Final Design Report. Team Name: No Rest for the Weary EEL 4924 Electrical Engineering Design (Senior Design) Final Design Report 4 August 2009 Project Title: SLEEP Team Name: No Rest for the Weary Team Members: Renard Sumlar lrsum825@ufl.edu Brad Bromlow

More information

LAMPIRAN A. Listing Program. Program pada Borland Delphi 7.0 A-1 Program pada CodeVisionAVR C Compiler A-6

LAMPIRAN A. Listing Program. Program pada Borland Delphi 7.0 A-1 Program pada CodeVisionAVR C Compiler A-6 A Listing Program Program pada Borland Delphi 7.0 A-1 Program pada CodeVisionAVR C Compiler A-6 LISTING PROGRAM BORLAND DELPHI 7.0 Inisialisasi ==========================================================

More information

// Voltage Reference: AREF pin #define ADC_VREF_TYPE ((0<<REFS1) (0<<REFS0) (0<<ADLAR))

// Voltage Reference: AREF pin #define ADC_VREF_TYPE ((0<<REFS1) (0<<REFS0) (0<<ADLAR)) 44 Lampiran 1 Listing program dari seluruh sistem. /****************************************************** * This program was created by the CodeWizardAVR V3.12 Advanced Automatic Program Generator Copyright

More information

Set of pulse decoding algorithms for quadrature rotary and linear encoders*

Set of pulse decoding algorithms for quadrature rotary and linear encoders* version 1.2 Set of pulse decoding algorithms for quadrature rotary and linear encoders* (*) Algorithms are likely platform nonindependent in performance comparison. However results are based to the Atmel

More information

LAMPIRAN A. Universitas Sumatera Utara

LAMPIRAN A. Universitas Sumatera Utara 63 LAMPIRAN A Rangkaian Lengkap Perangkat Keras Rangkaian ini terdiri dari Rangkaian Power Supply (PSA), Mikrokontroller atmega8535, RFID Reader ID 12, Rangkaian Infra Merah Fotodioda, driver max232 dan

More information

LAMPIRAN A PROGRAM UTAMA ROBOT NOMOR 2

LAMPIRAN A PROGRAM UTAMA ROBOT NOMOR 2 LAMPIRAN A PROGRAM UTAMA ROBOT NOMOR 2 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: [Bioloid Premium]-Robot 2 v 2 22: 23: 24: 25: A-1 26: 27: 28: 29: 30: 31: 32: 33: 34: 35:

More information

How2Use DT-AVR ATMEGA168 BMS. By: IE Team. Picture 1 The layout of DT-AVR ATMEGA168 BMS

How2Use DT-AVR ATMEGA168 BMS. By: IE Team. Picture 1 The layout of DT-AVR ATMEGA168 BMS DT-AVR ATMEGA168 BMS Application Note By: IE Team This Application Note (AN) serves as a tutorial of how to use the DT-AVR ATMEGA168 Bootloader Micro System along with its supplementary software. The layout

More information

// sets the position of cursor in row and column

// sets the position of cursor in row and column CODE: 1] // YES_LCD_SKETCH_10_14_12 #include //lcd(rs, E, D4, D5, D6, D7) LiquidCrystal lcd(8, 9, 4, 5, 6, 7); int numrows = 2; int numcols = 16; void setup() Serial.begin(9600); lcd.begin(numrows,

More information

The modules in this lab room are 4 line by 16 character display modules. The data sheet/users manual for the module is posted on My.Seneca.

The modules in this lab room are 4 line by 16 character display modules. The data sheet/users manual for the module is posted on My.Seneca. LCD Modules A common output display device used with low cost embedded systems is a character LCD display. The displays are available as complete modules with a standard microprocessor parallel interface.

More information

LAMPIRAN A FOTO Radio Control Helikopter dan Pengendalinya

LAMPIRAN A FOTO Radio Control Helikopter dan Pengendalinya LAMPIRAN A FOTO Radio Control Helikopter dan Pengendalinya Tampak Atas A-1 Tampak Depan A-2 Tampak Samping A-3 Tampak Belakang A-4 Pengendali A-5 LAMPIRAN B PROGRAM PADA MICROSOFT VISUAL BASIC 6 DAN PENGONTROL

More information

Project : Version : Date : 11/04/2016 Author : Freeware, for evaluation and non-commercial use only Company : Comments:

Project : Version : Date : 11/04/2016 Author : Freeware, for evaluation and non-commercial use only Company : Comments: Lampiran 1 Listing program dari seluruh sistem. /***************************************************** This program was produced by the CodeWizardAVR V2.04.9 Evaluation Automatic Program Generator Copyright

More information

LCD. Configuration and Programming

LCD. Configuration and Programming LCD Configuration and Programming Interfacing and Programming with Input/Output Device: LCD LCD (liquid crystal display) is specifically manufactured to be used with microcontrollers, which means that

More information

Robosoft Systems in association with JNCE presents. Swarm Robotics

Robosoft Systems in association with JNCE presents. Swarm Robotics Robosoft Systems in association with JNCE presents Swarm Robotics What is a Robot Wall-E Asimo ABB Superior Moti ABB FlexPicker What is Swarm Robotics RoboCup ~ 07 Lets Prepare for the Robotics Age The

More information

University of Texas at El Paso Electrical and Computer Engineering Department

University of Texas at El Paso Electrical and Computer Engineering Department University of Texas at El Paso Electrical and Computer Engineering Department EE 3176 Laboratory for Microprocessors I Fall 2016 LAB 07 Flash Controller Goals: Bonus: Pre Lab Questions: Familiarize yourself

More information

Home Alarm System. Digitala projekt (EITF40)

Home Alarm System. Digitala projekt (EITF40) Home Alarm System Digitala projekt (EITF40) Supervisor: Bertil Lindvall Written by: Christer Andersson (dt07ca5) Alexander Nässlander (dt09an2) 3/5/2013 Abstract In this report we will show our project

More information

AN703. Micro64/128. Accessing the 36k of SRAM 12/3/04

AN703. Micro64/128. Accessing the 36k of SRAM 12/3/04 AN703 Micro64/128 Accessing the 36k of SRAM 12/3/04 Introduction: Micro64/128 has a total of 36k of SRAM. 4 k of SRAM is built into the processor an additional 32k of SRAM is available inside the Micro64/128

More information

UNIVERSITY OF CONNECTICUT. ECE 3411 Microprocessor Application Lab: Fall Quiz II

UNIVERSITY OF CONNECTICUT. ECE 3411 Microprocessor Application Lab: Fall Quiz II Department of Electrical and Computing Engineering UNIVERSITY OF CONNECTICUT ECE 3411 Microprocessor Application Lab: Fall 2015 Quiz II There are 5 questions in this quiz. There are 9 pages in this quiz

More information

Introduction to the MC9S12 Hardware Subsystems

Introduction to the MC9S12 Hardware Subsystems Setting and clearing bits in C Using pointers in C o Program to count the number of negative numbers in an area of memory Introduction to the MC9S12 Hardware Subsystems o The MC9S12 timer subsystem Operators

More information

WEATHER STATION WITH SERIAL COMMUNICATION

WEATHER STATION WITH SERIAL COMMUNICATION WEATHER STATION WITH SERIAL COMMUNICATION Written by: Wenbo Ye, Xiao Qu, Carl-Wilhelm Igelström FACULTY OF ENGINEERING, LTH Digital and Analogue Projects EITF11 Contents Introduction... 2 Requirements...

More information

Lab Experiment 9: LCD Display

Lab Experiment 9: LCD Display Lab Experiment 9: LCD Display 1 Introduction Liquid Crystal Displays (LCDs) provide an effective way for processors to communicate with the outside world. The LPC2148 board used in the lab is equipped

More information

UNIVERSITY OF BOLTON SCHOOL OF ENGINEERING MSC SYSTEMS ENGINEERING AND ENGINEERING MANAGEMENT SEMESTER 2 EXAMINATION 2016/2017

UNIVERSITY OF BOLTON SCHOOL OF ENGINEERING MSC SYSTEMS ENGINEERING AND ENGINEERING MANAGEMENT SEMESTER 2 EXAMINATION 2016/2017 TW30 UNIVERSITY OF BOLTON SCHOOL OF ENGINEERING MSC SYSTEMS ENGINEERING AND ENGINEERING MANAGEMENT SEMESTER 2 EXAMINATION 2016/2017 MICROPROCESSOR BASED SYSTEMS MODULE NO: EEM7016 Date: Wednesday 17 May

More information

Introduction to Embedded Systems

Introduction to Embedded Systems Stefan Kowalewski, 4. November 25 Introduction to Embedded Systems Part 2: Microcontrollers. Basics 2. Structure/elements 3. Digital I/O 4. Interrupts 5. Timers/Counters Introduction to Embedded Systems

More information

COMP2121: Microprocessors and Interfacing. I/O Devices (II)

COMP2121: Microprocessors and Interfacing. I/O Devices (II) COMP2121: Microprocessors and Interfacing I/O Devices (II) http://www.cse.unsw.edu.au/~cs2121 Lecturer: Hui Wu Session 2, 2017 1 Overview Keyboard LCD (Liquid Crystal Display) 2 2 Input Switches (1/2)

More information

Universitas Sumatera Utara

Universitas Sumatera Utara 55 Lampiran 1. Konfigurasi Program Menghitung Data Komputer (Bahasa C) pada Mikro /******************************************************* This program was created by the CodeWizardAVR V2.60 Standard Automatic

More information

MICROPROCESSORS A (17.383) Fall Lecture Outline

MICROPROCESSORS A (17.383) Fall Lecture Outline MICROPROCESSORS A (17.383) Fall 2010 Lecture Outline Class # 03 September 21, 2010 Dohn Bowden 1 Today s Lecture Syllabus review Microcontroller Hardware and/or Interface Programming/Software Lab Homework

More information

Lecture (09) PIC16F84A LCD interface LCD. Dr. Ahmed M. ElShafee

Lecture (09) PIC16F84A LCD interface LCD. Dr. Ahmed M. ElShafee Lecture (09) PIC16F84A LCD interface PIC16F84A LCD interface Assignment 01, 4 Zones fire controller board Assignment 02, automatic water tank controller Dr. Ahmed M. ElShafee ١ ٢ LCD LCD (Liquid Crystal

More information

8051 Microcontroller

8051 Microcontroller 8051 Microcontroller The 8051, Motorola and PIC families are the 3 leading sellers in the microcontroller market. The 8051 microcontroller was originally developed by Intel in the late 1970 s. Today many

More information

CN310 Microprocessor Systems Design

CN310 Microprocessor Systems Design CN310 Microprocessor Systems Design Microcontroller Nawin Somyat Department of Electrical and Computer Engineering Thammasat University Outline Course Contents 1 Introduction 2 Simple Computer 3 Microprocessor

More information

PIC Microcontroller Introduction

PIC Microcontroller Introduction PIC Microcontroller Introduction The real name of this microcontroller is PICmicro (Peripheral Interface Controller), but it is better known as PIC. Its first ancestor was designed in 1975 by General Instruments.

More information

Serial Compact Flash Serial CF Card Module User Manual

Serial Compact Flash Serial CF Card Module User Manual CUBLOC Peripheral Serial Compact Flash Serial Card Module User Manual 3. Specifications Model -COM5 -COM3 Voltage 4.5~5.5V 2.7~5.5V - 115200 bps: 20KB/s - 115200 bps: 15KB/s Read Speed - 9600 bps: 6KB/s

More information

By the end of Class. Outline. Homework 5. C8051F020 Block Diagram (pg 18) Pseudo-code for Lab 1-2 due as part of prelab

By the end of Class. Outline. Homework 5. C8051F020 Block Diagram (pg 18) Pseudo-code for Lab 1-2 due as part of prelab By the end of Class Pseudo-code for Lab 1-2 due as part of prelab Homework #5 on website due before next class Outline Introduce Lab 1-2 Counting Timers on C8051 Interrupts Laboratory Worksheet #05 Copy

More information

8-bit Microcontroller. Application Note. AVR033: Getting Started with the CodeVisionAVR C Compiler

8-bit Microcontroller. Application Note. AVR033: Getting Started with the CodeVisionAVR C Compiler AVR033: Getting Started with the CodeVisionAVR C Compiler Features Installing and Configuring CodeVisionAVR to Work with the Atmel STK500 Starter Kit and AVR Studio Debugger Creating a New Project Using

More information

Cell Phone Controlled Security System. Project Proposal. Project Description. Don DeLaMare Kevin Brown Brian Faires. Introduction

Cell Phone Controlled Security System. Project Proposal. Project Description. Don DeLaMare Kevin Brown Brian Faires. Introduction Don DeLaMare Kevin Brown Brian Faires Cell Phone Controlled Security System Project Description Introduction Project Proposal Home security and home automation are wonderful features that everyone would

More information

INTERRUPTS in microprocessor systems

INTERRUPTS in microprocessor systems INTERRUPTS in microprocessor systems Microcontroller Power Supply clock fx (Central Proccesor Unit) CPU Reset Hardware Interrupts system IRQ Internal address bus Internal data bus Internal control bus

More information

8-bit Microcontroller. Application Note. AVR033: Getting Started with the CodeVisionAVR C Compiler

8-bit Microcontroller. Application Note. AVR033: Getting Started with the CodeVisionAVR C Compiler AVR033: Getting Started with the CodeVisionAVR C Compiler Features Installing and Configuring CodeVisionAVR to Work with the Atmel STK500 Starter Kit and AVR Studio Debugger Creating a New Project Using

More information

SC1602LC 16x2 Large Characters RS232 LCD Module. User s Manual. Large Viewing Area 99mm x 24mm. Large Character Size. 4.84mm x 9.66mm.

SC1602LC 16x2 Large Characters RS232 LCD Module. User s Manual. Large Viewing Area 99mm x 24mm. Large Character Size. 4.84mm x 9.66mm. Large Viewing Area 99mm x 24mm Large Character Size 4.84mm x 9.66mm Features 16x2 Large Characters LCD RS232 Interface Simple Serial Command Wide Range Voltage Operation ( 9-15V ) 8 User s Defined Characters

More information

Digital and Analogue Project Report

Digital and Analogue Project Report EITF 040 Digital and Analogue Project Report Group 6 Fida Saidani Qinghua Liu March, 2013 1 Abstract The aim of this project is to build an electronic device that makes use of the law of light reflection,

More information

6.1. EE 109 Unit 6. LCD Interfacing

6.1. EE 109 Unit 6. LCD Interfacing 6.1 EE 109 Unit 6 LCD Interfacing LCD BOARD 6.2 6.3 The EE 109 LCD Shield The LCD shield is a 16 character by 2 row LCD that mounts on top of the Arduino Uno. The shield also contains five buttons that

More information

2 IDS LCD Keypad User Manual C Issued March 2009

2 IDS LCD Keypad User Manual C Issued March 2009 2 3 4 Contents 1. Introduction to the IDS LCD Digital Keypad...8 2. Arming the Control Panel...8 2.1 Away Arming...8 2.1.1 How to Away Arm...8 2.1.2 Quick Away Arm Shortcut Key...8 2.2 Stay Arming...9

More information

ECE 375: Computer Organization and Assembly Language Programming

ECE 375: Computer Organization and Assembly Language Programming ECE 375: Computer Organization and Assembly Language Programming SECTION OVERVIEW Lab 4 Data Manipulation & the LCD Complete the following objectives: ˆ Understand the basics of data manipulation in AVR

More information

Designing Responsive and Real-Time Systems

Designing Responsive and Real-Time Systems Designing Responsive and Real-Time Systems Chapter 10 Renesas Electronics America Inc. Embedded Systems using the RX63N Rev. 1.0 00000-A Learning Objectives Most Embedded Systems have multiple real time

More information

ET-BASE AVR ATmega64/128

ET-BASE AVR ATmega64/128 ET-BASE AVR ATmega64/128 ET-BASE AVR ATmega64/128 which is a Board Microcontroller AVR family from ATMEL uses MCU No.ATmega64 and ATmega128 64PIN. Board ET-BASE AVR ATmega64/128 uses MCU s resources on

More information

AN10184 Connecting a keyboard to the Philips LPC9xx microcontroller

AN10184 Connecting a keyboard to the Philips LPC9xx microcontroller CIRCUITS ITEGRATED CIRCUITS ABSTRACT This application note demonstrates how to connect a keypad matrix to the LPC9xx microcontroller family from Philips Semiconductors. It explains a software example which

More information

CprE 288 Introduction to Embedded Systems (Timers/Input Capture) Instructors: Dr. Phillip Jones

CprE 288 Introduction to Embedded Systems (Timers/Input Capture) Instructors: Dr. Phillip Jones CprE 288 Introduction to Embedded Systems (Timers/Input Capture) Instructors: Dr. Phillip Jones 1 Announcements HW 4, Due Wed 6/13 Quiz 5 (15 min): Wed 6/13, Textbook reading: Section 9.1, 9.2 (your one-side

More information

USER GUIDE. for Android Version 1. alula.net ALULA 1

USER GUIDE. for Android Version 1. alula.net ALULA 1 USER GUIDE for Android Version 1 alula.net 1-888-88-ALULA 1 1. GETTING STARTED 3 2. DOWNLOAD THE ALULA APP 3 3. SIGN IN 3 4. LOCATIONS 4 5. MAIN DASHBOARD SCREEN 5 5.1. Application Menu 5 5.2. Feature

More information

12.1. Unit 12. Exceptions & Interrupts

12.1. Unit 12. Exceptions & Interrupts 12.1 Unit 12 Exceptions & Interrupts 12.2 Disclaimer 1 This is just an introduction to the topic of interrupts. You are not meant to master these right now but just start to use them We will cover more

More information

Important Notice. Customer Information. 2 WisDom User Manual

Important Notice. Customer Information. 2 WisDom User Manual User Manual Important Notice This manual is delivered subject to the following conditions and restrictions: This manual contains proprietary information belonging to RISCO Group. The information is supplied

More information

AVR Microcontrollers Architecture

AVR Microcontrollers Architecture ก ก There are two fundamental architectures to access memory 1. Von Neumann Architecture 2. Harvard Architecture 2 1 Harvard Architecture The term originated from the Harvard Mark 1 relay-based computer,

More information

Interrupt vectors for the 68HC912B32. The interrupt vectors for the MC9S12DP256 are located in memory from 0xFF80 to 0xFFFF.

Interrupt vectors for the 68HC912B32. The interrupt vectors for the MC9S12DP256 are located in memory from 0xFF80 to 0xFFFF. Interrupts The Real Time Interrupt Interrupt vectors for the 68HC912B32 The interrupt vectors for the MC9S12DP256 are located in memory from 0xFF80 to 0xFFFF. These vectors are programmed into Flash EEPROM

More information

Appendix A: Rack Specification Sheet

Appendix A: Rack Specification Sheet Appendices Appendix A: Rack Specification Sheet A-1 Appendix B: Pinion Specification Sheet B-1 Appendix C: Specification Sheets for Motors One and Two Motor One Specification Sheet C-1 C-2 Motor Two Specification

More information

Embedded Systems and Software

Embedded Systems and Software Embedded Systems and Software Lab 6 Considerations Lab 6 Considerations, Slide 1 Big Picture Connect to internal ADC + 0-5 V - Sensor To COM port on PC LCD RTC Optional: LCD display Lab 6 Considerations,

More information

8-bit Microcontroller. Application Note. AVR134: Real-Time Clock (RTC) using the Asynchronous Timer. Features. Theory of Operation.

8-bit Microcontroller. Application Note. AVR134: Real-Time Clock (RTC) using the Asynchronous Timer. Features. Theory of Operation. AVR134: Real-Time Clock (RTC) using the Asynchronous Timer Features Real-Time Clock with Very Low Power Consumption (4µA @ 3.3V) Very Low Cost Solution Adjustable Prescaler to Adjust Precision Counts Time,

More information

C:\CYGNAL\Examples\C8051F02x\C\Edu_Board_Source_Code\Magcard.c

C:\CYGNAL\Examples\C8051F02x\C\Edu_Board_Source_Code\Magcard.c Magcard.c Author: Baylor Electromechanical Systems Operates on an external 18.432 MHz oscillator. Target: Cygnal Educational Development Board / C8051F020 Tool chain: KEIL C51 6.03 / KEIL EVAL C51 This

More information

Introduction to Arduino. Wilson Wingston Sharon

Introduction to Arduino. Wilson Wingston Sharon Introduction to Arduino Wilson Wingston Sharon cto@workshopindia.com Physical computing Developing solutions that implement a software to interact with elements in the physical universe. 1. Sensors convert

More information

ECE251: Intro to Microprocessors Name: Solutions Mid Term Exam October 4, 2018

ECE251: Intro to Microprocessors Name: Solutions Mid Term Exam October 4, 2018 ECE251: Intro to Microprocessors Name: Solutions Mid Term Exam October 4, 2018 (PRINT) Instructions: No calculators, books, or cell phones; do not communicate with any other student. One side of a single

More information

Texas Instruments Microcontroller HOW-TO GUIDE Interfacing Keypad with MSP430F5529

Texas Instruments Microcontroller HOW-TO GUIDE Interfacing Keypad with MSP430F5529 Texas Instruments Microcontroller HOW-TO GUIDE Interfacing Keypad with MSP430F5529 Contents at a Glance PS PRIMER MSP430 kit... 3 Keypad... 4 Interfacing keypad... 4 Interfacing keypad with MSP430F5529...

More information

MICROCONTROLLER SYSTEM CONTROL DESIGN JON PRITCHARD SCOTT VON THUN

MICROCONTROLLER SYSTEM CONTROL DESIGN JON PRITCHARD SCOTT VON THUN MICROCONTROLLER SYSTEM CONTROL DESIGN JON PRITCHARD SCOTT VON THUN Problem Statement Create a simple feedback environment that can be used to demonstrate various feedback control systems using a microcontroller

More information

Using the KD30 Debugger

Using the KD30 Debugger ELEC3730 Embedded Systems Tutorial 3 Using the KD30 Debugger 1 Introduction Overview The KD30 debugger is a powerful software tool that can greatly reduce the time it takes to develop complex programs

More information

Created by: Alarm System Store Quick Start Guide. for Interlogix NetworX NX4, NX6 & NX8

Created by: Alarm System Store   Quick Start Guide. for Interlogix NetworX NX4, NX6 & NX8 Quick Start Guide for Interlogix NetworX NX4, NX6 & NX8 Programming Code = 9713 Master User Code=1234 Program Mode= *8 + 9713 To exit programming hit the Exit key until you reach the home screen If this

More information

/*Algorithm: This code display a centrifuge with five variable speed RPM by increaseing */

/*Algorithm: This code display a centrifuge with five variable speed RPM by increaseing */ /*Algorithm: This code display a centrifuge with five variable speed RPM by increaseing */ /*the speed the cell which are less dense can float and the cell that are denser can sink*/ /*the user has five

More information

TEVATRON TECHNOLOGIES PVT. LTD Embedded! Robotics! IoT! VLSI Design! Projects! Technical Consultancy! Education! STEM! Software!

TEVATRON TECHNOLOGIES PVT. LTD Embedded! Robotics! IoT! VLSI Design! Projects! Technical Consultancy! Education! STEM! Software! Summer Training 2016 Advance Embedded Systems Fast track of AVR and detailed working on STM32 ARM Processor with RTOS- Real Time Operating Systems Covering 1. Hands on Topics and Sessions Covered in Summer

More information

C Language Programming, Interrupts and Timer Hardware

C Language Programming, Interrupts and Timer Hardware C Language Programming, Interrupts and Timer Hardware In this sequence of three labs, you will learn how to write simple C language programs for the MC9S12 microcontroller, and how to use interrupts and

More information

Understanding the basic building blocks of a microcontroller device in general. Knows the terminologies like embedded and external memory devices,

Understanding the basic building blocks of a microcontroller device in general. Knows the terminologies like embedded and external memory devices, Understanding the basic building blocks of a microcontroller device in general. Knows the terminologies like embedded and external memory devices, CISC and RISC processors etc. Knows the architecture and

More information

USER GUIDE. for ios Version 1. alula.net ALULA 1

USER GUIDE. for ios Version 1. alula.net ALULA 1 USER GUIDE for ios Version 1 alula.net 1-888-88-ALULA 1 1. GETTING STARTED 3 2. DOWNLOAD THE ALULA APP 3 3. SIGN IN 3 4. 4. LOCATIONS 4 5. MAIN DASHBOARD SCREEN 5 5.1. Application Menu 5 5.3. Feature Menus

More information

Embedded Systems. Software Development & Education Center. (Design & Development with Various µc)

Embedded Systems. Software Development & Education Center. (Design & Development with Various µc) Software Development & Education Center Embedded Systems (Design & Development with Various µc) Module 1: Embedded C Programming INTRODUCTION TO EMBEDDED SYSTEM History & need of Embedded System Basic

More information

University of Texas at El Paso Electrical and Computer Engineering Department. EE 3176 Laboratory for Microprocessors I.

University of Texas at El Paso Electrical and Computer Engineering Department. EE 3176 Laboratory for Microprocessors I. University of Texas at El Paso Electrical and Computer Engineering Department EE 3176 Laboratory for Microprocessors I Fall 2016 LAB 04 Timer Interrupts Goals: Learn about Timer Interrupts. Learn how to

More information

Project Final Report Internet Ready Refrigerator Inventory Control System

Project Final Report Internet Ready Refrigerator Inventory Control System Project Final Report April 25, 2006 Dustin Graves, dgraves@gwu.edu Project Abstract Appliance vendors have started producing internet enabled refrigerators which allow users to keep track of refrigerator

More information

IMDL Fall 2010 Final Report

IMDL Fall 2010 Final Report IMDL Fall 2010 Final Report Robot Spotting Courtney Hayes Summary This robot project consists of a large robot and a smaller one interacting with each other. The larger robots objective is to track another

More information

80C51 Block Diagram. CSE Overview 1

80C51 Block Diagram. CSE Overview 1 80C51 Block Diagram CSE 477 8051 Overview 1 80C51 Memory CSE 477 8051 Overview 3 8051 Memory The data width is 8 bits Registers are 8 bits Addresses are 8 bits i.e. addresses for only 256 bytes! PC is

More information

The EE 109 LCD Shield

The EE 109 LCD Shield EE 109 Unit 7 LCD 1 LCD BOARD 2 3 The EE 109 LCD Shield The LCD shield is a 16 character by 2 row LCD that mounts on top of the Arduino Uno. The shield also contains five buttons that can be used as input

More information

Overview of Microcontroller and Embedded Systems

Overview of Microcontroller and Embedded Systems UNIT-III Overview of Microcontroller and Embedded Systems Embedded Hardware and Various Building Blocks: The basic hardware components of an embedded system shown in a block diagram in below figure. These

More information

ECE2049 E17 Lecture 4 MSP430 Architecture & Intro to Digital I/O

ECE2049 E17 Lecture 4 MSP430 Architecture & Intro to Digital I/O ECE2049-E17 Lecture 4 1 ECE2049 E17 Lecture 4 MSP430 Architecture & Intro to Digital I/O Administrivia Homework 1: Due today by 7pm o Either place in box in ECE office or give to me o Office hours tonight!

More information

Microcontroller Based Code Locking System with Alarm

Microcontroller Based Code Locking System with Alarm IOSR Journal of Electrical and Electronics Engineering (IOSR-JEEE) e-issn: 2278-1676,p-ISSN: 2320-3331, Volume 9, Issue 1 Ver. II (Jan. 2014), PP 09-17 Microcontroller Based Code Locking System with Alarm

More information

Course Introduction. Purpose: Objectives: Content: 27 pages 4 questions. Learning Time: 20 minutes

Course Introduction. Purpose: Objectives: Content: 27 pages 4 questions. Learning Time: 20 minutes Course Introduction Purpose: This course provides an overview of the Direct Memory Access Controller and the Interrupt Controller on the SH-2 and SH-2A families of 32-bit RISC microcontrollers, which are

More information

UNIVERSITY OF BOLTON SCHOOL OF ENGINEERING. BEng(Hons) Electrical and Electronics Engineering SEMESTER 1 EXAMINATION 2016/2017

UNIVERSITY OF BOLTON SCHOOL OF ENGINEERING. BEng(Hons) Electrical and Electronics Engineering SEMESTER 1 EXAMINATION 2016/2017 TW34 UNIVERSITY OF BOLTON SCHOOL OF ENGINEERING BEng(Hons) Electrical and Electronics Engineering SEMESTER 1 EXAMINATION 2016/2017 INTERMEDIATE EMBEDDED SYSTEMS MODULE NO: EEE5004 Date: Thursday 12 January

More information

Dept. of Computer Engineering Final Exam, First Semester: 2016/2017

Dept. of Computer Engineering Final Exam, First Semester: 2016/2017 Philadelphia University Faculty of Engineering Course Title: Embedded Systems (630414) Instructor: Eng. Anis Nazer Dept. of Computer Engineering Final Exam, First Semester: 2016/2017 Student Name: Student

More information

16.317: Microprocessor Systems Design I Fall Exam 3 December 15, Name: ID #:

16.317: Microprocessor Systems Design I Fall Exam 3 December 15, Name: ID #: 16.317: Microprocessor Systems Design I Fall 2014 Exam 3 December 15, 2014 Name: ID #: For this exam, you may use a calculator and one 8.5 x 11 double-sided page of notes. All other electronic devices

More information

LCDs. Embedded Systems Interfacing. 20 September 2011

LCDs. Embedded Systems Interfacing. 20 September 2011 20 September 2011 How Polarizers Work How work How Color Work Other Technologies Reflective Nematic (no back light) Cholesteric Liquid Crystal Organic LED/Polymer LED Vacuum Florescent Display Display

More information

C Language Programming, Interrupts and Timer Hardware

C Language Programming, Interrupts and Timer Hardware C Language Programming, Interrupts and Timer Hardware In this sequence of three labs, you will learn how to write simple C language programs for the MC9S12 microcontroller, and how to use interrupts and

More information

BV4218. I2C-LCD & Keypad. Product specification. December 2008 V0.a. ByVac 2006 ByVac Page 1 of 9

BV4218. I2C-LCD & Keypad. Product specification. December 2008 V0.a. ByVac 2006 ByVac Page 1 of 9 Product specification December 2008 V0.a ByVac 2006 ByVac Page 1 of 9 Contents 1. Introduction...3 2. Features...3 3. Electrical Specification...3 4. I2C set...4 5. The LCD Set...5 5.1. 1...5 5.2. 2...5

More information

UBC104 Embedded Systems. Review: Introduction to Microcontrollers

UBC104 Embedded Systems. Review: Introduction to Microcontrollers UBC104 Embedded Systems Review: Introduction to Microcontrollers Processors General purpose processors: 80386 Pentium Core Duo Large number of pins External memory External peripherals * Figure from Intel

More information

SECURE DIGITAL ACCESS SYSTEM USING IBUTTON

SECURE DIGITAL ACCESS SYSTEM USING IBUTTON SECURE DIGITAL ACCESS SYSTEM USING IBUTTON Access control forms a vital link in a security chain. Here we describe a secure digital access system using ibutton that allows only authorised persons to access

More information

BME 4900 Page 1 of 2. Meeting 2: Personal Progress Report 12/2/09 Team 12 with Drew Seils. Semester One Week Two

BME 4900 Page 1 of 2. Meeting 2: Personal Progress Report 12/2/09 Team 12 with Drew Seils. Semester One Week Two BME 4900 Page 1 of 2 Semester One Week Two These past two saw a lot of progress with the Revo stationary bike project. During Thanksgiving break Shane spent most of his time doing research for the power

More information

ATMega16 AVR AVR AVR DIP. (in-circiut programming) desktop MOSI MOSIT. AVRProg. header. (toggle)

ATMega16 AVR AVR AVR DIP. (in-circiut programming) desktop MOSI MOSIT. AVRProg. header. (toggle) ATMega16 AVR AVR ATMega16 AVR AVR AVR DIP (in-circiut programming) desktop MOSI GND SK MISO MOSIT Ω Dontronic SK MISO AVRProg AVR109 JTAGIEII STK500 AVR header AVRProg clock I/O (toggle) clock GND V ATMega16

More information

Microprocessors & Interfacing

Microprocessors & Interfacing Lecture Overview Microprocessors & Interfacing Input/Output Devices Input devices Input switches Basics of switches Keypads Output devices LCD Lecturer : Dr. Annie Guo S2, 2008 COMP9032 Week8 1 S2, 2008

More information

EMBEDDED HARDWARE DESIGN. Tutorial Interfacing LCD with Microcontroller /I

EMBEDDED HARDWARE DESIGN. Tutorial Interfacing LCD with Microcontroller /I EMBEDDED HARDWARE DESIGN Tutorial Interfacing LCD with Microcontroller 2009-10/I LCD (Liquid Crystal Display) has become very popular option for displaying in Embedded Applications. Since they are very

More information

Virtual Keypad App Help Last update: 2017/02/02

Virtual Keypad App Help Last update: 2017/02/02 Virtual Keypad App Help 16461 Last update: 2017/02/02 Table of Contents Virtual Keypad App Help Center... 1 Managing Your App Account... 2 Using Your App... 3 System in Alarm... 4 Contacting Your Security

More information

ED1021 I/O Expander with UART interface & analog inputs

ED1021 I/O Expander with UART interface & analog inputs Preliminary Highlights 4.5V 5.5V power supply range. 12 GPIOs. Up to 40mA maximum current in each output except GPIO8 (up to a total device current of 175mA). Most GPIOs can be an input to a 10bit ADC.

More information