Project Number: RF Project Description: Appendix:

Size: px
Start display at page:

Download "Project Number: RF Project Description: Appendix:"

Transcription

1 Project Number: RF09 Project Description: The WatchDuck is an accelerometer-based low cost wireless pool alarm. While the summer is coming, everybody knows how unsafe personal pools are for children: accidents happen so quickly. There are some products on the market to prevent such accidents but these pool alarms are quite expensive, about $00, and most of them are not wireless which is unfortunate since a lot of these accidents happen while the parents are inside the house. To address this issue, I chose to build my own wireless pool alarm. To keep this alarm under $0, I had to use diy single side PCBs. However, every handyman knows how difficult is using diy PCBs for a project dealing with RF: the constraint of a single side makes impossible the use of micro-strips for instance. The Mhz RF Transceivers are thus a good off-the-shelf solution to resolve this issue. In addition, the use of a -axis accelerometer module H8 was essential to overcome the issue of soldering QFN packages. This alarm is composed of two parts: the detector and the base station. Mounted into a bath ducky, the detector is using an accelerometer module (H8 from Parallax) to measure the vertical acceleration (Z-axis): the floating duck is following the surface waves of the pool. When an object a child fell into the water, it creates waves which are detected by the accelerometer. When the G-force detected is above a threshold, the detector is sending an alert to the base station which triggers an alarm. When the G-force is bellow this threshold, the detector is periodically reporting its status to the base station (about time every seconds). By doing so, the base station is checking the reliability of the link with the detector and this latter, using the Power-Down functionality of the transmitter, is saving every (which is an important consideration for a battery-powered device). All these operation are done by a low power consumption PIC microcontroller (PIC 8FK0). The second part of the alarm is the base station, which includes a second RF Transceiver and provides a user interface based on a x0 characters LCD display and touch keys. By reading and processing the messages send by the detector, this base station is able to display the detector status, the alarm status and the signal strength (thanks to the RSSI signal). The user can easily navigate through these data using the touch keys which provide a visual and acoustic feedback. When an alert is sent by the detector, the base station is triggering an alarm through a buzzer. All these operation are done by the same microcontroller than the detector. To ensure the reliability of the system, the wireless link is based on the transmission and reception of fixedlength data ( bytes) in the form of data packets. The data packets consist of a preamble, the actual data byte, and a 6-bits cyclic redundancy check CRC-6-CCITT. The system is also able to detect a low battery level of the detector and report the issue to the user. As shown on the presentation video, this project is a success. The delay between a motion and the triggering of the alarm is very low ( 0 ms) and the 6-bits CRC prevents all false detections. All the other functionalities of the system (signal strength, low voltage detection ) are working. I tested the alarm in a bath tub but further tests need to be performed in situation in order to calibrate the alarm: an issue since I don t have a pool! Appendix: - Schematics - Layouts - Source Code - Bill of Materials - Pictures - Video: or

2 C-PIC 00nF +.V RA/T0CKI/COUT 6 RA/AN/SS/HLVDIN/COUT 7 RA6/OSC/CLKO 0 RA7/OSC/CLKI 9 RB0/AN/INT0/FLT0 RB/AN0/INT/CIN-/PC RB/AN8/INT/PB RB/AN9/CCPB/CIN- RB/AN/KBI0/PD RB/KBI/PGM 6 RB6/KBI/PGC 7 RB7/KBI/PGD 8 RC0/TOSO/TCKI RC/SCK/SCL RC/SDI/SDA RC/SDO 6 RC6/TX/CK 7 RC7/RX/DT 8 RE/MCLR/VPP RC/TOSI/CCPA RC/CCP/PA RA0/AN0/CIN0- RA/AN/CIN- RA/AN/CIN+/VREF-/CVREF RA/AN/CIN+/VREF+ U PIC8FK0 VDD=+.V VSS=GND PGM PGC PGD MCLR RF Transceiver RSSI 6 PDN TX-RX DATA VIN GND U MHZ TRANSCEIVER PARALLAX +.V SEL PDN CLK Vss DIO Vdd 6 CS Zero-G U H8C -AXI PARALLAX +V SPI_CLK CS_ADC RSSI RSSI PDN SPI_CLK CS_ADC TX RX R k FARNELL = 6970 TX RX SEL BAT CONN-SIL +.V +V EN_V BAT_SW BAT_SW 6 ICSP RJ-6-R R 0k MCLR +.V PGD PGC PGM LED_R LED_G R 68 BAT_SW EN_V 6 A B C D E F G PROJECT: DATE: WatchDuck Detector 0/06/0 Laurent Goudet / REV: AUTHOR: DESIGN: SHEET: LED_R LED_G SW Switch IP68 Vin Vout GND EN RSN U SP60 C uf C uf BAT_OK BAT_OK R 70k U6 LED-BICO Vin Vout GND SHDN Bypass U TC0 C uf C uf BUZZER BUZZER BUZZER CONN-SIL R6 0k +V Q PMF90XN R7 0k +.V SPI_DATA SPI_DATA

3 6 A B C D E F G PROJECT: DATE: WatchDuck Base - Main /0/0 Laurent Goudet / REV: AUTHOR: DESIGN: SHEET: D D D6 D7 +V RS E RF Transceiver RSSI 6 PDN TX-RX DATA VIN GND U MHZ TRANSCEIVER +.V SEL PDN RSSI TX RX R6 k TX RX KEY PIC KEY PIC KEY PIC KEY PIC D D D6 D7 RS E SEL RSSI PDN 6 ICSP CONN-RJ R 0k MCLR +.V PGD PGC PGM C-PIC 00nF +.V RA/T0CKI/COUT 6 RA/AN/SS/HLVDIN/COUT 7 RA6/OSC/CLKO 0 RA7/OSC/CLKI 9 RB0/AN/INT0/FLT0 RB/AN0/INT/CIN-/PC RB/AN8/INT/PB RB/AN9/CCPB/CIN- RB/AN/KBI0/PD RB/KBI/PGM 6 RB6/KBI/PGC 7 RB7/KBI/PGD 8 RC0/TOSO/TCKI RC/SCK/SCL RC/SDI/SDA RC/SDO 6 RC6/TX/CK 7 RC7/RX/DT 8 RE/MCLR/VPP RC/TOSI/CCPA RC/CCP/PA RA0/AN0/CIN0- RA/AN/CIN- RA/AN/CIN+/VREF-/CVREF RA/AN/CIN+/VREF+ U PIC8FK0 VDD=+.V VSS=GND D7 D6 D D D 0 D 9 D 8 D0 7 E 6 RW RS VSS VDD V0 LED+ LED- 6 U NHD-00DZ-FSW-FBW +V PGD PGC PGM MCLR BUZZER BUZZER CONN-SIL LED_ LED_ LED_ LED_ LCD_BKLT BUZZER A K D LED R LED_ A K D6 LED R LED_ A K D7 LED R LED_ A K D8 LED R LED_ LCD_BKLT Q PMF90XN R7 M + - POWER POWER MM +.V Vin Vout GND SHDN Bypass U TC0 C uf C uf +V Vin Vout GND EN RSN U SP60 C uf C uf V_REG V_REG RV RES-VAR

4 6 A B C D E F G OUT OUT 7 OUT 6 OUT VDD VSS 8 SNS SNSK SNS SNSK SNS 9 SNSK 0 SNS 7 SNSK 8 RES OSC SS/SYNC 9 U6 QT0-ISSG KEY_ KEY_ KEY_ KEY_ +V R 6k R 60k R6 80k C-KEYS nf +V RS.k CS 0nF RSNS k R M J PIN RS.k CS 0nF RSNS k J PIN RS.k CS 0nF RSNS k R M J PIN RS.k CS 0nF RSNS k R M J PIN +V PROJECT: DATE: WatchDuck Base - Touch Keys /0/0 Laurent Goudet / REV: AUTHOR: DESIGN: SHEET: OSC SS/SYNC SS/SYNC OSC A K D LED R7 0 KEY_ KEY PIC A K D LED R8 0 KEY_ KEY PIC A K D LED R9 0 KEY_ KEY PIC A K D LED R0 0 KEY_ KEY PIC C 0.uF

5

6

7

8 C:\Users\Laurent\Desktop\Parallax Contest\Software\Detector.c / Parallax / Linx Technologies 00 RF Design Contest WatchDuck Project - Detector FILENAME: Detector.c Version:., Updated on /0/00 DESCRIPTION: This program is the detector side of the WatchDuck Project, an accelerometer-based wireless pool alarm. This code polls the Z-axis acceleration from a H8 -axis accelerometer module in order to detect the waves created by a a child accidentally fell into a swimming pool. When this value is above a threshold, it transmits an alert message to the base station, which trigger an alarm. When no waves are detected, the detector periodically send a status message to the base station to ensure the reliability of the link. The communication protocole used by this program is freely inspired by the one created by Parallax Inc. and used in the -Way demo code for Parallax MHz RF Transceiver (798). It is based on the transmission and reception of fixed- length data ( bytes) in the form of data packets, to help overcome the error- prone nature of RF reception in various environments. The data packets consist of a preamble, the actual data byte and a CRC value. The format is as follow: Preamble = "U!". Any number of "U" characters may be sent before the single "!". The "U" character is chosen because it's bit pattern is "0000" (alternating 's and zero's). This gets the receiver "in sync" with the data bits that follow. Packet data format: Data Value CRC High CRC Low BYTE BYTE BYTE - Byte is the actual data value. - Byte and byte consists of a 6-bit Cyclic Redundancy Check (CRC) value calculated using the byte. The use of this CRC increases error detection to approx. 99%. The protocol for sending and receiving is as follows (shown is a simplified form): ) The sending device constructs the entire packet, as shown above and calculates the CRC value. ) The sending device transmits the preamble and the packet. ) The receiving device receives the packet, calculates a CRC value and compares the calcuated CRC value with the CRC value received inside the packet. ) If CRC values match: receiver uses the received data, otherwise it discards it (c) Laurent Goudet - lgoudet@gmail.com / #include <p8fk0.h> #include <timers.h> #include <delays.h> #include <usart.h> #include <string.h> #pragma config FOSC=INTIO67 #pragma config WDTEN= OFF #pragma config LVP= OFF #pragma config BOREN = OFF #pragma config PWRT = ON #pragma config MCLRE = ON // Internal Oscillator Block // WatchDog disabled // Low Voltage Programming disabled // Brown-out Reset disabled // Power-up Timer enabled // MCLRE pin enabled / I/O Definitions / // Status LEDs #define LED_G LATCbits.LATC // Green status LED #define LED_R LATCbits.LATC // Red status LED // H8 module (-axis accelerometer)

9 C:\Users\Laurent\Desktop\Parallax Contest\Software\Detector.c #define EN_ACC LATCbits.LATC0 // Accelerometer ON/OFF #define CS_ADC LATAbits.LATA0 // Select accelerometer (SPI bus) // SPI link (PIC <=> H8 Module) #define SPI_CLK LATCbits.LATC // Clock #define SPI_OUT LATCbits.LATC // MOSI (PIC => H8) #define SPI_IN PORTCbits.RC // MISO (PIC <= H8) #define SPI_DIR TRISCbits.TRISC // Data Pin Direction // MHz RF Transceiver #define SEL_DIR LATBbits.LATB // Data Direction (: Transmit, 0: Receive) #define PDN LATBbits.LATB // Power-Down (: Normal, 0: Power-Down) #define RSSI PORTBbits.RB // Received Signal Strength Indicator // Misc #define BAT_OK PORTAbits.RA6 // Low Battery Indicator #define BUZZER LATAbits.LATA7 // Alarm / Macros Definitions / #define SENSITIVITY 90 // Sensitivity of the detection // ADC channels #define ZAxis // Z-axis ADC channel #define VRef // VRef ADC channel / Global Variables Definitions / volatile char buz_stop = 0; // Used to toggle the alarm / Prototype Definitions / void init(void); unsigned int get_force(void); unsigned int get_adc(unsigned char); void send_data(unsigned char); unsigned int crc_calc(unsigned char); void bip(int); void high_isr(void); void DelayXsec(int); // System initializations // Return the force on the Z-axis // Return the value on an ADC channel // Send Data to the Base Station // Calculates CRC-6-CCITT // Generates a single bip // Interrupts catch up function // Generates a delay of X seconds / interrupt_at_high_vector(void) - Function placed at the interrupt vector and transferring control to the proper ISR. / #pragma code high_vector=0x08 void interrupt_at_high_vector(void) _asm GOTO high_isr _endasm #pragma code / return to the default code section / / main(void) - Main routine / void main(void) unsigned int result = 0; // G-force on the Z-axis int count = 000; // Counter to generate a periodic report init(); // Initializations LED_R = ; // Red LED ON DelayXsec(0); // Wait for seconds => Time to put the duck into the water LED_R = 0; // Red LED OFF

10 C:\Users\Laurent\Desktop\Parallax Contest\Software\Detector.c // MAIN LOOP while() result = get_force(); // Get the vertical acceleration // If the result is abode the sensitivity level => Alert if(result > SENSITIVITY) LED_R = ; // Turn the red LED ON bip(); // Acoustic Feedback send_data('a'); // Send the alert to the base station DelayXsec(); // Wait for seconds LED_R = 0; // Red LED OFF // If the G-force is below the sensitivity level else count++; // Increment periodic report counter // Generates a report to the base station every seconds if(count > 000) count = 0; // Reset periodic report counter // If the battery level is low if(!bat_ok) LED_R = ; send_data('b'); // Send the information to the base station else LED_G = ; send_data('c'); // The detector is working fine LED_G = 0; LED_R = 0; // while() // main() / void init(void) - Initializations / void init(void) //Clock initialization OSCCONbits.IRCF = ; // Set internal clock to 6 Mhz // => PORTA Configuration PORTA = 0; LATA = 0; // A0: CS_ACC => Output (0) // A6: LOW_BAT => Input () // A7: BUZZER => Output (0) // ==> 0_0 => 0x7E TRISA = 0x7E; // => PORTB Configuration PORTB = 0; LATB = 0; // B: SEL_DIR => Output (0) // B: PDN => Output (0) // B: RSSI => Input () // ==> _00 => 0xF TRISB = 0xF; // => PORTC Configuration PORTC = 0; LATC = 0; // C0: EN_ACC => Output (0) // C: LED_R => Output (0) // C: LED_G => Output (0) // C: SPI_CLK => Output (0) // C: SPI_IN => Input () // C: SPI_OUT => Ouput (0) // C6-C7: Don't care // => _0000 => 0xF0; TRISC = 0xF0; // Accelerometer

11 C:\Users\Laurent\Desktop\Parallax Contest\Software\Detector.c EN_ACC = ; CS_ADC = ; // Turn ON the accelerometer // Deselect accelorometer's ADC // init() / unsigned int get_force(void) - Return a value representing the g-force on the Z-axis. We don't really care about real g-force. / unsigned int get_force(void) unsigned int refcount, axiscount, result; refcount = get_adc(vref); // Read reference voltage axiscount = get_adc(zaxis); // Read Z-axis voltage // Format the result if(axiscount > refcount) result = axiscount - refcount; else result = refcount - axiscount; return result; // get_force() / unsigned int get_adc(unsigned char channel) - Return the value of the ADC channel given in parameter / unsigned int get_adc(unsigned char channel) int i; unsigned int result = 0; unsigned char tosend = 0x8 (0x0 & channel); SPI_DIR = 0; // SPI data bus in output CS_ADC = 0; // Select ADC for(i = ; i >= 0; i--) // Sending ADC channel SPI_OUT = (tosend >> i); SPI_CLK = ; SPI_CLK = 0; SPI_DIR = ; // SPI data bus in input SPI_CLK = ; // Wait for conversion SPI_CLK = 0; SPI_CLK = ; SPI_CLK = 0; for(i = ; i >= 0; i--) // Reading the result SPI_CLK = ; SPI_CLK = 0; result += (SPI_IN << i); CS_ADC = ; // Deselect ADC return result; / void send_data(unsigned char data) - Send Alerts & Detector status to the base station / void send_data(unsigned char data) char mess[0]; unsigned int crc; int try = 0; crc = crc_calc(data); mess[0] = 'U'; mess[] = 'U'; mess[] = 'U'; // Output message // CRC sent by the detector // Nummber of sending // Calcul of data CRC // Message Preamble

12 C:\Users\Laurent\Desktop\Parallax Contest\Software\Detector.c mess[] = 'U'; mess[] = '!'; mess[] = data; mess[6] = crc >> 8; mess[7] = crc; mess[8] = '\0'; // Data Byte // CRC High // CRC Low // Terminating null byte PDN = ; // RF Transceiver enable Delay00TCYx(8); // Turn-On Time from PDN: 00µS SEL_DIR = ; // Transceiver in transmit mode Delay00TCYx(8); // RX to TX Change Time: 00µS // Initialization of the transceiver interface // Asynchronous Mode, 00 BAUDS OpenUSART( USART_TX_INT_OFF & USART_RX_INT_OFF & USART_ASYNCH_MODE & USART_EIGHT_BIT & USART_CONT_RX & USART_BRGH_LOW, 07 ); // Data packet is send multiples time if one is lost while(try < 0) putsusart(mess); // Sending message DelayKTCYx(); // Give time for UART to process try ++; PDN = 0; // // RF Transceiver disable to save energy // send_data() / unsigned int crc_calc(unsigned char) - Calculates the CRC-6-CCITT of a data byte. Source: / unsigned int crc_calc(unsigned char data ) unsigned int x; unsigned int crc = 0; x = ((crc>>8) ^ (unsigned int) data) & 0xff; x ^= x>>; crc = (crc << 8) ^ (x << ) ^ (x <<) ^ x; return crc; // crc_calc() / void alarm(int on) - Generates a single bip / void bip(int on) // Alarm ON if(on) // => Timer 0: Buzzer frequency => approx Hz OpenTimer0( TIMER_INT_ON & T0_8BIT & T0_SOURCE_INT & T0_PS ); // => Timer : Bip frequency OpenTimer( TIMER_INT_ON & T_8BIT_RW & T_SOURCE_INT & T_PS 8 & T_OSCEN_OFF & T_SYNC_EXT_OFF ); // Alarm OFF else CloseTimer0(); // Close timer 0 CloseTimer(); // Close timer // alarm()

13 C:\Users\Laurent\Desktop\Parallax Contest\Software\Detector.c / high_isr(void) - Interrupts sub-routine. / #pragma interrupt high_isr void high_isr(void) if(pirbits.tmrif) bip(0); // End of the bip PIRbits.TMRIF = 0; // Reset Timer interrupt flag // Timer 0 Interrupt else BUZZER = ~BUZZER; INTCONbits.TMR0IF = 0; // Reset Timer 0 interrupt flag // high_isr() / void DelayXsec(int nbseconds) - Wait for x seconds / void DelayXsec(int nbseconds) int i; for(i = 0; i < nbseconds; i++) Delay0KTCYx(00); // Wait for 0µS Delay0KTCYx(00); // Wait for 0µS // DelayXsec() 6

14 C:\Users\Laurent\Desktop\Parallax Contest\Software\Base.c / Parallax / Linx Technologies 00 RF Design Contest WatchDuck Project - Base Station FILENAME: Base.c Version:., Updated on /0/00 DESCRIPTION: This program is the receptor side of the WatchDuck Project, an accelerometer-based wireless pool alarm. This code reads the data sent by the detector through the wireless link, processes them, and displays the result the result on a user interface composed of a x0 characters LCD display and touch keys. In addition to triggering an alarm when a motion has been detected, it can also display the strength of the signal sent by the detector and its level of battery. The communication protocole used by this program is freely inspired by the one created by Parallax Inc. and used in the -Way demo code for Parallax MHz RF Transceiver (798). It is based on the transmission and reception of fixed- length data ( bytes) in the form of data packets, to help overcome the error- prone nature of RF reception in various environments. The data packets consist of a preamble, the actual data byte and a CRC value. The format is as follow: Preamble = "U!". Any number of "U" characters may be sent before the single "!". The "U" character is chosen because it's bit pattern is "0000" (alternating 's and zero's). This gets the receiver "in sync" with the data bits that follow. Packet data format: Data Value CRC High CRC Low BYTE BYTE BYTE - Byte is the actual data value. - Byte and byte consists of a 6-bit Cyclic Redundancy Check (CRC) value calculated using the byte. The use of this CRC increases error detection to approx. 99%. The protocol for sending and receiving is as follows (shown is a simplified form): ) The sending device constructs the entire packet, as shown above and calculates the CRC value. ) The sending device transmits the preamble and the packet. ) The receiving device receives the packet, calculates a CRC value and compares the calcuated CRC value with the CRC value received inside the packet. ) If CRC values match: receiver uses the received data, otherwise it discards it (c) Laurent Goudet - lgoudet@gmail.com / #include <p8fk0.h> #include <timers.h> #include <delays.h> #include <xlcd.h> #include <usart.h> #include <adc.h> #include <string.h> #include <stdlib.h> #pragma config FOSC=INTIO67 #pragma config WDTEN= OFF #pragma config LVP= OFF #pragma config BOREN = OFF #pragma config PWRT = ON #pragma config MCLRE = ON // Internal Oscillator Block // WatchDog disabled // Low Voltage Programming disabled // Brown-out Reset disabled // Power-up Timer enabled // MCLRE pin enabled / I/O Definitions / // Touch Keys #define KEY_ PORTAbits.RA // ON/OFF (Top) #define KEY_ PORTCbits.RC // Right Arrow (Right)

15 C:\Users\Laurent\Desktop\Parallax Contest\Software\Base.c #define KEY_ PORTCbits.RC // Stop Alarm (Bottom) #define KEY_ PORTCbits.RC // Left Arrow (Left) // Blue Feedback LEDs #define LED_ LATAbits.LATA7 // Key (ON/OFF) #define LED_ LATCbits.LATC // Key (Right Arrow) #define LED_ LATAbits.LATA6 // Key (Stop Alarm) #define LED_ LATCbits.LATC // Key (Left Arrow) // x0 Characters LCD Module #define LCD_DATA PORTA // Data bus (lower bits) #define LCD_RS LATBbits.LATB // Register Select (0: Cmd, : Data) #define LCD_E LATBbits.LATB // Operation Enable (Falling edge) #define LCD_BKLT LATAbits.LATA // Backlight (: ON, 0: OFF) // MHz RF Transceiver #define SEL_DIR LATBbits.LATB0 // Data Direction (: Transmit, 0: Receive) #define PDN LATBbits.LATB // Power-Down (: Normal, 0: Power-Down) #define RSSI PORTBbits.RB // Received Signal Strength Indicator // Misc #define BUZZER LATCbits.LATC0 // Alarm / Macros Definitions / #define NB_MENUS // Number of menu in the UI / Global Variables Definitions / volatile char buz_stop = 0; volatile char alarm_en = ; volatile char alert = 0; volatile char detector_status = 'D'; volatile int detector_timeout = 0; volatile int event = 0; volatile int bip_en = 0; volatile int menu = 0; // Used to toggle the alarm // Alarm Enable / Disable // Alert in progress // Status of the Detector // To test if the detector is connected // A new event just happens // Used to generate a single bip // Menu item number / Prototype Definitions / void init(void); void welcome(void); void display_menu(int); void print_status(void); void print_rssi(void); unsigned int get_rssi(void); void read_keys(void); void print_event(void); void timeout(void); void trigger_alarm(void); void alarm(int); void bip(int); void high_isr(void); void receive_data(void); unsigned int crc_calc(unsigned char); void DelayFor8TCY(void); void DelayPORXLCD(void); void DelayXLCD(void); void DelayXsec(int); // System initializations // Welcome Screen + LEDs // Display the menu // Print detector status on LCD display // Print signal strength on LCD display // Return signal strength // Read the Touch Keys and process them // Print new event on the LCD display // Check for connection timeout // Trigger the alarm // Turn the alarm ON or OFF // Generate a single bip // Interrupts catch up function // Receive data from detector // Calculates CRC-6-CCITT // Delay 8 cycles for the XLCD library // Delay ms for the XLCD library // Delay ms for the XLCD library // Generates a delay of X seconds / interrupt_at_high_vector(void) - Function placed at the interrupt vector and transferring control to the ISR proper. / #pragma code high_vector=0x08 void interrupt_at_high_vector(void) _asm GOTO high_isr _endasm

16 C:\Users\Laurent\Desktop\Parallax Contest\Software\Base.c #pragma code / return to the default code section / / main(void) - Main routine / void main(void) int menu_old; // Use to know when the menu has changed init(); // Initialization welcome(); // Display the welcome message DelayXsec(); // Wait for seconds menu_old = menu; // Use to know when the menu has changed display_menu(menu); // Display the first menu // MAIN LOOP // In order to not loose any data from the detector, the UART receiver is // using interrupts while() // No alert is in progress if(!alert) read_keys(); // Read the touch keys display_menu(menu); // Display the menu on the LCD display if(menu_old!= menu) menu_old = menu; Delay0KTCYx(00); // If the menu has changed // There is a new event from the detector if(event) // Wait for 00ms (debounce the keys) print_event(); // Print the event on the LCD display event = 0; // Clear the event flag // The detector is currently connected to the base station if(detector_status!= 'D') timeout(); // if(!alert) // A alert has been sent by the detector else // while() // main() trigger_alarm(); // Test the connection time out and update // the connection status // Trigger the alarm (blocking function) / void init(void) - Initialize PIC clockand I/Os / void init(void) //Clock initialization OSCCONbits.IRCF = ; // Set internal clock to 6 Mhz // => PORTA Configuration PORTA = 0; LATA = 0; // A0-A: LCD_DATA => Output (0000) // A: LCD_BKLT => Output (0) // A: KEY_ => Input () // A6: LED_ => Output (0) // A7: LED_ => Output (0) // ==> 000_0000 => 0x0 TRISA = 0x0; // => PORTB Configuration PORTB = 0; LATB = 0; // B0: SEL_TXRX => Output (0) // B: PDN => Output (0) // B: RSSI => Input () // B: LCD_E => Output (0)

17 // B: LCD_RS => Output (0) // B-B7: Don't care // ==> 0_000 => 0xE TRISB = 0xE; // => PORTC Configuration // C0: BUZZER => Output (0) // C: LED_ => Output (0) // C: KEY_ => Input () // C: KEY_ => Input () // C: LED_ => Output (0) // C: KEY_ => Input () // C6-C7: Don't care // 0_00 => 0xEC PORTC = 0; TRISC = 0xEC; C:\Users\Laurent\Desktop\Parallax Contest\Software\Base.c // => Configure all inputs as digital I/Os except AN8, used for RSSI ANSEL = 0x00; ANSELH = 0x0; // AN8 = RSSI // LCD Module LCD_BKLT = ; OpenXLCD( FOUR_BIT & LINES_X7 ); // RF Module PDN = ; SEL_DIR = 0; // RF Transceiver enable // Transceiver in receive mode // Initialization of the receiver interface // Asynchronous Mode, 00 BAUDS, RX Interrupts ON OpenUSART( USART_TX_INT_OFF & USART_RX_INT_ON & USART_ASYNCH_MODE & USART_EIGHT_BIT & USART_CONT_RX & USART_BRGH_LOW, 07 ); TXSTAbits.TXEN = 0; TRISCbits.TRISC6 = ; // Transmit disabled // TX Pin in high impedance // Configure A/D convertor (for RSSI conversion) OpenADC( ADC_FOSC_6 & ADC_RIGHT_JUST & ADC_0_TAD, ADC_CH8 & ADC_VREFPLUS_VDD & ADC_VREFMINUS_VSS & ADC_INT_OFF, 0x000 ); // => Enable interrupts INTCONbits.PEIE = ; INTCONbits.GIE = ; // Enable peripherical interrupts // General interrupt enable switch // init() / void welcome(void) - Display Welcome Message and LEDs / void welcome(void) int i; // Display welcome message putrsxlcd( "==== WatchDuck ====" ); SetDDRamAddr(0x0); putrsxlcd( "===== Welcome =====" ); // LEDs Intro for(i=0; i<; i++) LED_ = ; Delay0KTCYx(0); LED_ = 0; LED_ = ; Delay0KTCYx(0); LED_ = 0; LED_ = ; Delay0KTCYx(0);

18 LED_ = 0; LED_ = ; Delay0KTCYx(0); LED_ = 0; Delay0KTCYx(0); LED_ = ; LED_ = ; LED_ = ; LED_ = ; // welcome() C:\Users\Laurent\Desktop\Parallax Contest\Software\Base.c / void display_menu(int menu) - Display the menu on the LCD display / void display_menu(int menu) switch( menu ) // Menu 0: Status of the detector case 0: putrsxlcd( "==DETECTOR: STATUS==" ); putrsxlcd( " " ); SetDDRamAddr(0x0); print_status(); // Print the status of the detector break; // Menu : Strength of the wireless link case : putrsxlcd( "==SIGNAL: STRENGTH==" ); SetDDRamAddr(0x0); print_rssi(); break; // Menu : Status of the alarm case : putrsxlcd( "===ALARM: STATUS===" ); SetDDRamAddr(0x0); if(alarm_en) putrsxlcd( " Enable " ); else putrsxlcd( " Disable " ); break; // We shouldn't be there default: putrsxlcd( " ERROR MENU " ); SetDDRamAddr(0x0); putrsxlcd( " " ); // display_menu() // Print a bargraph representing the RSSI value / void print_status(void) - Print the status of the detector on the LCD display / void print_status(void) // Status = 'D': the detector is disconnected if(detector_status == 'D') putrsxlcd( " Disconnected " ); // Status = 'C': the detector is connected else if(detector_status == 'C') putrsxlcd( " Connected " ); // Status = 'B': the batteries of the detector are low else if(detector_status == 'B') putrsxlcd( " Low Battery " );

19 C:\Users\Laurent\Desktop\Parallax Contest\Software\Base.c // Status = 'A': a motion has been detected else if(detector_status == 'A') putrsxlcd( " Alert " ); // We shouldn't be there else putrsxlcd( " Status Error " ); // print_status() / void print_rssi(void) - Print a bargraph representating the signal strengh on the LCD display / void print_rssi(void) int rssi; // RSSI numerical value char bargraph[]; // Bargraph representing the RSSI value float conv = 0.0; // Convertion ratio rssi value <=> bargraph unsigned int strenght; // Numerical result of the convertion int i; rssi = get_rssi(); // Return the numerical RSSI value strenght = (unsigned int) (rssi conv); for(i = 0; (i <= strenght && i <= 0); i++) bargraph[i] = 0xFF; // 0xFF => 'Black square' character bargraph[strenght+] = '\0'; // Null char to close the string putrsxlcd( " " ); SetDDRamAddr(0x0); putsxlcd(bargraph); // Print the bargraph on the LCD display Delay0KTCYx(0); // Wait ms before re-updating the bargraph // print_rssi() / unsigned int get_rssi(void) - Return the RSSI value after an A/D convertion / unsigned int get_rssi(void) unsigned int rssi; ConvertADC(); // Start convertion while( BusyADC() ); // Wait for completion rssi = ReadADC(); // Read result // get_rssi() / void read_keys(void) - Scan the Touch Keys of the user interface / void read_keys(void) // KEY_ = ON/OFF key if(key_) // The alarm is enable if(alarm_en) alarm_en = 0; // Disable the alarm putrsxlcd( " Alarm OFF " ); SetDDRamAddr(0x0); putrsxlcd( " " ); bip(); // Acoustic Feedback DelayXsec(); // Wait for sec LED_ = 0; LED_ = 0; LED_ = 0; LED_ = 0; LCD_BKLT = 0; // The alarm is disable else alarm_en = ; LCD_BKLT = ; // Shut-down the LEDs // Shut-down the LCD display backlight // Enable the alarm // Turn-on the LCD backlight 6

20 C:\Users\Laurent\Desktop\Parallax Contest\Software\Base.c LED_ = ; // Turn-on the LEDs LED_ = ; LED_ = ; LED_ = ; bip(); // Acoustic Feedback putrsxlcd( " Alarm ON " ); SetDDRamAddr(0x0); putrsxlcd( " " ); DelayXsec(); // Wait for sec // if(key_) // KEY_ = Left Arrow else if(key_) bip(); // Acoustic Feedback // Decrement menu counter menu--; if (menu < 0) menu = (NB_MENUS-); // else if(key_) // KEY_ = Alarm Off // If we are there, no alert is currently running else if(key_) bip(); putrsxlcd( " No Alert Detected " ); SetDDRamAddr(0x0); putrsxlcd( " " ); DelayXsec(); // else if(key_) // KEY_ = Right Arrow else if(key_) bip(); menu++; if (menu > (NB_MENUS-)) menu = 0; // else if(key_) // read_keys() // If loop => start over // Acoustic Feedback // Wait for sec // Acoustic Feedback // Increment menu counter // If loop => start over / void print_event(void) - Print a new event on the LCD display / void print_event(void) // A motion has been detecting if(detector_status == 'A') putrsxlcd( " WARNING " ); SetDDRamAddr(0x0); putrsxlcd( " Motion Detected " ); // The detector has a low battery level if(detector_status == 'B') putrsxlcd( " WARNING " ); SetDDRamAddr(0x0); putrsxlcd( "Detector Low Battery" ); // The detector is now connected else if(detector_status == 'C') putrsxlcd( " Detector " ); SetDDRamAddr(0x0); putrsxlcd( " Connected " ); // We shouldn't be there else putrsxlcd( " ERROR TRANSMISSION " ); SetDDRamAddr(0x0); putrsxlcd( " " ); bip(); // Acoustic feedback DelayXsec(); // Wait for second 7

21 C:\Users\Laurent\Desktop\Parallax Contest\Software\Base.c // print_event() / void timeout(void) - Check if the detector is still connected to the base station / void timeout(void) detector_timeout++; // Increlent timeout counter // Timeout counter > 00 =~ seconds if(detector_timeout > 00) bip(); // Acoustic feedback putrsxlcd( " Detector " ); SetDDRamAddr(0x0); putrsxlcd( " Disconnected " ); DelayXsec(); // Wait for sec detector_status = 'D'; // Update detector status => disconnected detector_timeout = 0; // Reset timeout counter // timeout() display_menu(menu); // Display menu on the LCD display / void void trigger_alarm(void) - Trigger the alarm and wait for stop key / void trigger_alarm(void) putrsxlcd( "!!!! ALERT!!!! " ); SetDDRamAddr(0x0); putrsxlcd( " Motion Detected " ); alarm(); // Launch the alarm while(!key_); // Poll the stop key alarm(0); // Stop the alarm alert = 0; // End of the alert bip(); // Acoustic feedback putrsxlcd( " End of Alert " ); SetDDRamAddr(0x0); putrsxlcd( " " ); DelayXsec(); // Wait for sec // trigger_alarm() / void alarm(int on) - Turn on or off the alarm / void alarm(int on) // Alarm ON if(on) buz_stop = 0; // => Timer 0: Buzzer frequency => approx Hz OpenTimer0( TIMER_INT_ON & T0_8BIT & T0_SOURCE_INT & T0_PS ); // => Timer : Bip frequency OpenTimer( TIMER_INT_ON & T_8BIT_RW & T_SOURCE_INT & T_PS 8 & T_OSCEN_OFF & T_SYNC_EXT_OFF ); // Alarm OFF else CloseTimer0(); // Close timer 0 CloseTimer(); // Close timer 8

22 C:\Users\Laurent\Desktop\Parallax Contest\Software\Base.c // alarm() / void bip(int start) - Generates a single bip / void bip(int start) if(start) bip_en = ; alarm(); else alarm(0); bip_en = 0; // bip() / high_isr(void) - Interrupts sub-routine. Process Timer 0, Timer and UART interrupts / #pragma interrupt high_isr void high_isr(void) unsigned char inputchar; // Input Character // UART RX Interrupt => New data byte in the FIFO if(pirbits.rcif) inputchar = getcusart(); // Read new data byte if(inputchar == '!') // If start character detected receive_data(); PIRbits.RCIF = 0; // Timer Interrupt else if(pirbits.tmrif) // If not single bip (= alarm) if(!bip_en) buz_stop = ~buz_stop; // If signal bip else bip(0); PIRbits.TMRIF = 0; // Timer 0 Interrupt else // If buzzer not in hold if(!buz_stop) BUZZER = ~BUZZER; // If buzzer in hold else BUZZER = 0; INTCONbits.TMR0IF = 0; // high_isr() // Get all the data packet // Reset RX interrupt flag // Toggle alarm state // End of the bip // Reset Timer interrupt flag // Reset Timer 0 interrupt flag / void receive_data(void) - Received the data packet from the detector / void receive_data(void) unsigned char inputstr[]; // Input String: Mess + CRC + Null Char unsigned int crc; // Calculated CRC unsigned int receivedcrc; // Received CRC unsigned int crc_high, crc_low; // Received CRC High & Low bytes getsusart(inputstr,); // Get the data packet 9

23 C:\Users\Laurent\Desktop\Parallax Contest\Software\Base.c crc = crc_calc(inputstr[0]); // Calc the CRC of the data byte crc_high = ((unsigned int) inputstr[]) << 8; crc_low = (unsigned int) inputstr[]; receivedcrc = crc_high + crc_low; // Read the received CRC // If the CRC are the same => process the data byte if(crc == receivedcrc && crc!= 0) detector_timeout = 0; // Clear timeout detector // If this is an alert if(inputstr[0] == 'A' && alarm_en) alert = ; // Launch the alert // If this is not an alert => update detector status else if(detector_status!= inputstr[0]) detector_status = inputstr[0]; event = ; // receive_data() / unsigned int crc_calc(unsigned char) - Calculates the CRC-6-CCITT of a data byte. Source: / unsigned int crc_calc(unsigned char data ) unsigned int x; unsigned int crc = 0; x = ((crc>>8) ^ (unsigned int) data) & 0xff; x ^= x>>; crc = (crc << 8) ^ (x << ) ^ (x <<) ^ x; return crc; // crc_calc() / void DelayFor8TCY(void) - Delay of 8 cycles for the XLCD library / void DelayFor8TCY(void) Delay0TCYx(00); // DelayFor8TCY() / void DelayPORXLCD(void) - Delay of ms for the XLCD library / void DelayPORXLCD(void) Delay0KTCYx(00); // DelayPORXLCD() / void DelayXLCD(void) - Delay of ms for the XLCD library / void DelayXLCD(void) DelayKTCYx(00); // DelayXLCD() / void DelayXsec(int nbseconds) - Wait for x seconds / void DelayXsec(int nbseconds) 0

24 C:\Users\Laurent\Desktop\Parallax Contest\Software\Base.c int i; for(i = 0; i < nbseconds; i++) Delay0KTCYx(00); // Wait for 0µS Delay0KTCYx(00); // Wait for 0µS // DelayXsec()

25 Bill Of Materials ================= Design: WatchDuck - Detector Doc. no.: Revision: Author: Laurent Goudet Created: /0/0 Modified: /0/0 BoM Detector.TXT QTY PART-REFS VALUE Resistors R k R,R6,R7 0k R 68 R 70k Capacitors C-C uf C-PIC 00nF Integrated Circuits U PIC8FK0 U H8C -AXI U MHZ TRANSCEIVER U SP60 U TC0 U6 LED-BICO Transistors Q PMF90XN Miscellaneous BAT,BUZZER CONN-SIL ICSP RJ-6-R SW Switch IP68 Page

26 BoM Base Station.TXT Bill Of Materials ================= Design: WatchDuck - Base Station Doc. no.: Revision: Author: Laurent Goudet Created: /0/0 Modified: /0/0 QTY PART-REFS VALUE Resistors R-R,R7 M R 6k R 60k R6 80k R7-R0 0 R-R R 0k R6 k RS-RS.k RSNS-RSNS k Capacitors C-C uf C 0.uF C-KEYS nf C-PIC 00nF CS-CS 0nF Integrated Circuits U PIC8FK0 U NHD-00DZ-FSW-FBW U MHZ TRANSCEIVER U SP60 U TC0 U6 QT0-ISSG Transistors Q PMF90XN Diodes D-D8 LED Miscellaneous BUZZER CONN-SIL ICSP CONN-RJ J-J PIN POWER POWER MM RV RES-VAR Page

27

28

29

C:\Users\cunningh\StaysOnPC\ME430 Downloads & Projects\exam2_problem1\problem1Cunningham.c

C:\Users\cunningh\StaysOnPC\ME430 Downloads & Projects\exam2_problem1\problem1Cunningham.c C:\Users\cunningh\StaysOnPC\ME430 Downloads & Projects\exam2_problem1\problem1Cunningham.c / FileName: problem1cunningham.c Processor: PIC18F4520 Compiler: MPLAB C18 v.3.06 This file does the following...

More information

The MCU s Pulse. Internal clock or oscillator to synchronize operation. One clock cycle = 1 TOSC = 1/fOSC. t TOSC

The MCU s Pulse. Internal clock or oscillator to synchronize operation. One clock cycle = 1 TOSC = 1/fOSC. t TOSC The MCU s Pulse Internal clock or oscillator to synchronize operation V 0 t TOSC One clock cycle = 1 TOSC = 1/fOSC Clock Cycle The minimum time to perform any operation is one instruction cycle TCY 1 TCY

More information

Remote Controlled KitchenAid Mixer for the Clients at ADEC. Appendices. Arnaud Bacye Karina Dubé Justin Erman Matthew Martin

Remote Controlled KitchenAid Mixer for the Clients at ADEC. Appendices. Arnaud Bacye Karina Dubé Justin Erman Matthew Martin Mix Masters Remote Controlled KitchenAid Mixer for the Clients at ADEC Appendices Arnaud Bacye Karina Dubé Justin Erman Matthew Martin Table of Contents A Hardware Schematics and Boards 2 A.1 Current Schematics

More information

GPS Reader. Figure 1: RMC NEMA Tag Definition

GPS Reader. Figure 1: RMC NEMA Tag Definition Douglas Guardino GPS Reader In this project a PIC 18F452 will be used to get one sentence from a GPS and make that sentence available to another PIC. This is done because the GPS puts out a bunch of sentences

More information

Analog Output with a Digital to Analog Converter

Analog Output with a Digital to Analog Converter Analog Output with a Digital to Analog Converter Matthew Beckler beck0778@umn.edu EE2361 Lab 007 April 5, 2006 Abstract Without help, microcontrollers can have great trouble creating analog signals. Approximations

More information

Embedded Systems Module. 6EJ505. C Tutorial 3: using the ICD3 rev tjw

Embedded Systems Module. 6EJ505. C Tutorial 3: using the ICD3 rev tjw Embedded Systems Module. 6EJ505 C Tutorial 3: using the ICD3 rev. 27.9.16 tjw Images are reproduced from Reference 1. Microchip permits the use of its images for educational purposes. Main Learning Points

More information

The MICROPROCESSOR PRINCIPLES AND APPLICATIONS Lab 7

The MICROPROCESSOR PRINCIPLES AND APPLICATIONS Lab 7 The MICROPROCESSOR PRINCIPLES AND APPLICATIONS Lab 7 Timer, USART Cheng-Chien Su 蘇正建 Home Automation, Networking, and Entertainment Lab Dept. of Computer Science and Information Engineering National Cheng

More information

Chapter 9. Input/Output (I/O) Ports and Interfacing. Updated: 3/13/12

Chapter 9. Input/Output (I/O) Ports and Interfacing. Updated: 3/13/12 Chapter 9 Input/Output (I/O) Ports and Interfacing Updated: 3/13/12 Basic Concepts in I/O Interfacing and PIC18 I/O Ports (1 of 2) I/O devices (or peripherals) such as LEDs and keyboards are essential

More information

Internet de les coses aplicat a la millora del servei de Bicing de Barcelona Pàg. 1

Internet de les coses aplicat a la millora del servei de Bicing de Barcelona Pàg. 1 Internet de les coses aplicat a la millora del servei de Bicing de Barcelona Pàg. 1 * Program of the TFG: Internet de les Coses Aplicat a la Millora del Servei de Bicing de Barcelona * /****** I N C L

More information

MicroToys Guide: PS/2 Mouse N. Pinckney April 2005

MicroToys Guide: PS/2 Mouse N. Pinckney April 2005 Introduction A computer mouse provides an excellent device to acquire 2D coordinate-based user input, since most users are already familiar with it. Most mice usually come with two or three buttons, though

More information

EET203 MICROCONTROLLER SYSTEMS DESIGN Serial Port Interfacing

EET203 MICROCONTROLLER SYSTEMS DESIGN Serial Port Interfacing EET203 MICROCONTROLLER SYSTEMS DESIGN Serial Port Interfacing Objectives Explain serial communication protocol Describe data transfer rate and bps rate Describe the main registers used by serial communication

More information

RTC Interface 89C51 DS M. Krishna Kumar MAM/M7/LU17/V1/ Vcc VCC 5 SDA P1.0 6 SCL P KHz 3 BAT 3.

RTC Interface 89C51 DS M. Krishna Kumar MAM/M7/LU17/V1/ Vcc VCC 5 SDA P1.0 6 SCL P KHz 3 BAT 3. RTC Interface 89C51 Vcc P1.0 10k 10k 5 SDA DS 1307 8 VCC P1.1 6 SCL X1 1 + 3 BAT X2 2 32.768KHz - 3.6V 4 GND INTB\SQW 7 M. Krishna Kumar MAM/M7/LU17/V1/2004 1 RTC Interface contd. DS 1307 is a real time

More information

DEVBOARD3 DATASHEET. 10Mbits Ethernet & SD card Development Board PIC18F67J60 MICROCHIP

DEVBOARD3 DATASHEET. 10Mbits Ethernet & SD card Development Board PIC18F67J60 MICROCHIP DEVBOARD3 DATASHEET 10Mbits Ethernet & SD card PIC18F67J60 MICROCHIP Version 1.0 - March 2009 DEVBOARD3 Version 1.0 March 2009 Page 1 of 7 The DEVBOARD3 is a proto-typing board used to quickly and easily

More information

USART Functions. putsusart puts1usart puts2usart putrsusart putrs1usart putrs2usart. ReadUSART Read1USART Read2USART getcusart getc1usart getc2usart

USART Functions. putsusart puts1usart puts2usart putrsusart putrs1usart putrs2usart. ReadUSART Read1USART Read2USART getcusart getc1usart getc2usart 1 of 11 USART Functions TABLE OF CONTENTS 1 Introduction 2 Function Descriptions 2.1 BusyUSART Busy1USART Busy2USART 2.2 CloseUSART Close1USART Close2USART 2.3 DataRdyUSART DataRdy1USART DataRdy2USART

More information

1 Introduction to Computers and Computer Terminology Programs Memory Processor Data Sheet Example Application...

1 Introduction to Computers and Computer Terminology Programs Memory Processor Data Sheet Example Application... Overview of the PIC 16F648A Processor: Part 1 EE 361L Lab 2.1 Last update: August 19, 2011 Abstract: This report is the first of a three part series that discusses the features of the PIC 16F684A processor,

More information

Embedded systems. Exercise session 3. Microcontroller Programming Lab Preparation

Embedded systems. Exercise session 3. Microcontroller Programming Lab Preparation Embedded systems Exercise session 3 Microcontroller Programming Lab Preparation Communications Contact Mail : michael.fonder@ulg.ac.be Office : 1.82a, Montefiore Website for the exercise sessions and the

More information

Breeze Board. Type A. User Manual.

Breeze Board. Type A. User Manual. Breeze Board Type A User Manual www.dizzy.co.za Contents Introduction... 3 Overview Top... 4 Overview Bottom... 5 Getting Started (Amicus Compiler)... 6 Power Circuitry... 7 USB... 8 Microcontroller...

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

1 Introduction to Computers and Computer Terminology Programs Memory Processor Data Sheet... 4

1 Introduction to Computers and Computer Terminology Programs Memory Processor Data Sheet... 4 Overview of the PIC 16F648A Processor: Part 1 EE 361L Lab 2.1 Last update: August 1, 2016 Abstract: This report is the first of a three part series that discusses the features of the PIC 16F648A processor,

More information

MOD-ZIGBEE-PIR sensor development board USER S MANUAL All boards produced by Olimex LTD are ROHS compliant

MOD-ZIGBEE-PIR sensor development board USER S MANUAL All boards produced by Olimex LTD are ROHS compliant sensor development board USER S MANUAL All boards produced by Olimex LTD are ROHS compliant Revision B, Januray 2013 Designed by OLIMEX Ltd, 2011 Disclaimer: 2012 Olimex Ltd. Olimex, logo and combinations

More information

Lab 6 RS-232 Communication The following routines are provided for devices with a single USART peripheral:

Lab 6 RS-232 Communication The following routines are provided for devices with a single USART peripheral: Still More Lab 6 Considerations; Embedded System Power Issues; Project Information Lab 6 RS-232 Communication The following routines are provided for devices with a single USART peripheral: BusyUSART CloseUSART

More information

The FED PIC Flex 2 Development Boards

The FED PIC Flex 2 Development Boards The FED PIC Flex 2 Development Boards THE FED PIC Flex Development board offers a host for 28 or 40 pin devices and includes LED's, switches, transistor switches, USB interface, serial port, support circuitry,

More information

Microcontroller Overview

Microcontroller Overview Microcontroller Overview Microprocessors/Microcontrollers/DSP Microcontroller components Bus Memory CPU Peripherals Programming Microcontrollers vs. µproc. and DSP Microprocessors High-speed information

More information

Display Real Time Clock (RTC) On LCD. Version 1.2. Aug Cytron Technologies Sdn. Bhd.

Display Real Time Clock (RTC) On LCD. Version 1.2. Aug Cytron Technologies Sdn. Bhd. Display Real Time Clock (RTC) On LCD PR12 Version 1.2 Aug 2008 Cytron Technologies Sdn. Bhd. Information contained in this publication regarding device applications and the like is intended through suggestion

More information

Pedometer 3 Click. PID: MIKROE 3259 Weight: 24 g

Pedometer 3 Click. PID: MIKROE 3259 Weight: 24 g Pedometer 3 Click PID: MIKROE 3259 Weight: 24 g The Pedometer 3 click is a tri-axis acceleration sensing Click board utilizing the KX126-1063. An advanced three-axis acceleration sensor, the KX126-1063

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

Evaluates: MAX MAX20743 Evaluation Kit. General Description. Quick Start. Features. Required Equipment. Optional Equipment.

Evaluates: MAX MAX20743 Evaluation Kit. General Description. Quick Start. Features. Required Equipment. Optional Equipment. MAX07 Evaluation Kit Evaluates: MAX07 General Description The MAX07 Evaluation Kit (EV kit) serves as a reference platform for evaluating the MAX07 voltage regulator IC. This single-chip, integrated switching

More information

ET-PIC 24 WEB-V1. o Central Processing Unit (CPU) o System. o nanowatt Power Managed Modes. o Analog Features

ET-PIC 24 WEB-V1. o Central Processing Unit (CPU) o System. o nanowatt Power Managed Modes. o Analog Features ET-PIC 24 WEB-V1 ET-PIC 24 WEB-V1 is PIC Board Microcontroller from Microchip that uses 16 Bit No.PIC24FJ128GA008 Microcontroller for processing data and develops board. The remarkable specification of

More information

Hong Kong Institute of Vocational Education Digital Electronics & Microcontroller. 8. Microcontroller

Hong Kong Institute of Vocational Education Digital Electronics & Microcontroller. 8. Microcontroller 8. Microcontroller Textbook Programming Robot Controllers, Myke Predko, McGraw Hill. Reference PIC Robotics: A Beginner's Guide to Robotics Projects Using the PIC Micro, John Iovine, McGraw Hill. Embedded

More information

Accurate Time and Interrupts

Accurate Time and Interrupts Accurate Time and Interrupts Matthew Beckler beck0778@umn.edu EE2361 Lab Section 007 March 7, 2006 Abstract In this lab, we create a very accurate digital clock using one of the microcontroller s timers.

More information

Implementation of Temperature Sensor on PICM4520 Microcontroller

Implementation of Temperature Sensor on PICM4520 Microcontroller Implementation of Temperature Sensor on PICM4520 Microcontroller Application Note Brad Pasbjerg Design Team 7 March 30 th, 2012 1 Table of Contents Cover... 1 Table of Contents... 2 Abstract... 3 Keywords...

More information

EXPERIMENT 5. Oven Temperature Control Using Open loop and Closed Loop Methods

EXPERIMENT 5. Oven Temperature Control Using Open loop and Closed Loop Methods 1 2 3 4 5 6 7 8 9 10 11 12 13 14 VDD VEE RS RW E D0 D1 D2 D3 D4 D5 D6 D7 68% EXPERIMENT 5 Oven Temperature Control Using Open loop and Closed Loop Methods Aim: To learn how to use the interrupt, ADC and

More information

Embedded System Programming

Embedded System Programming Embedded System Programming Released_task_Embedded_System_Programming_4007 of 9 CONTENTS This project consists of the following documentation/files:. 6_42GE_TW_EN_Software.doc 2. Test.hex 3. Example.c

More information

Human Response Timer

Human Response Timer Human Response Timer Matthew Beckler beck0778@umn.edu EE2361 Lab Section 007 March 29, 2006 Abstract In this lab, we create a very useful application, a human response timer. The user s reaction time is

More information

Lecture (03) PIC16F84 (2)

Lecture (03) PIC16F84 (2) Lecture (03) PIC16F84 (2) By: Dr. Ahmed ElShafee ١ PIC16F84 has a RISC architecture, or Harvard architecture in another word ٢ PIC16F84 belongs to a class of 8 bit microcontrollers of RISC architecture.

More information

Interrupts on PIC18F252 Part 2

Interrupts on PIC18F252 Part 2 Interrupts on PIC18F252 Part 2 Following pages list Special Function Registers (SFRs) involved in interrupt configuration and operation on PIC18F252 microcontroller. (Copied from Microchip s PIC18Fxx2

More information

Introduction to Microcontroller Apps for Amateur Radio Projects Using the HamStack Platform.

Introduction to Microcontroller Apps for Amateur Radio Projects Using the HamStack Platform. Introduction to Microcontroller Apps for Amateur Radio Projects Using the HamStack Platform www.sierraradio.net www.hamstack.com Topics Introduction Hardware options Software development HamStack project

More information

C and Embedded Systems. So Why Learn Assembly Language? C Compilation. PICC Lite C Compiler. PICC Lite C Optimization Results (Lab #13)

C and Embedded Systems. So Why Learn Assembly Language? C Compilation. PICC Lite C Compiler. PICC Lite C Optimization Results (Lab #13) C and Embedded Systems A µp-based system used in a device (i.e, a car engine) performing control and monitoring functions is referred to as an embedded system. The embedded system is invisible to the user

More information

RFID: Read and Display V2010. Version 1.1. Sept Cytron Technologies Sdn. Bhd.

RFID: Read and Display V2010. Version 1.1. Sept Cytron Technologies Sdn. Bhd. PR8-B RFID: Read and Display V2010 Version 1.1 Sept 2010 Cytron Technologies Sdn. Bhd. Information contained in this publication regarding device applications and the like is intended through suggestion

More information

TP6825. USB Full Speed Game Pad Controller. Data Sheet. Tenx reserves the right to change or discontinue this product without notice.

TP6825. USB Full Speed Game Pad Controller. Data Sheet. Tenx reserves the right to change or discontinue this product without notice. Advance Information TP6825 USB Full Speed Game Pad Controller Data Sheet Tenx reserves the right to change or discontinue this product without notice. tenx technology, inc. Contain 1. GENERAL DESCRIPTION...

More information

unsigned char ReadADC() { /************* start A/D, read from an A/D channel *****************/ unsigned char ADC_VALUE;

unsigned char ReadADC() { /************* start A/D, read from an A/D channel *****************/ unsigned char ADC_VALUE; /*********************************************************************************************/ /* BME 361 Biomeasurement Lab - PIC18F4525BT Demo */ /* Laboratories 1-8: A/D, D/A, LCD display, ECG simulation,

More information

SquareWear Programming Reference 1.0 Oct 10, 2012

SquareWear Programming Reference 1.0 Oct 10, 2012 Content: 1. Overview 2. Basic Data Types 3. Pin Functions 4. main() and initsquarewear() 5. Digital Input/Output 6. Analog Input/PWM Output 7. Timing, Delay, Reset, and Sleep 8. USB Serial Functions 9.

More information

* File: 8x8_matrix_vinyl.c. * Author: Phil Glazzard. * Created on 16 August 2016, 17:59. /* This design drives five 8x8 common cathode LED matrices

* File: 8x8_matrix_vinyl.c. * Author: Phil Glazzard. * Created on 16 August 2016, 17:59. /* This design drives five 8x8 common cathode LED matrices /* * File: 8x8_matrix_vinyl.c * Author: Phil Glazzard * * Created on 16 August 2016, 17:59 */ /* This design drives five 8x8 common cathode LED matrices * via MAX7219 constant current drivers using SPI

More information

Embedded Systems Programming and Architectures

Embedded Systems Programming and Architectures Embedded Systems Programming and Architectures Lecture No 10 : Data acquisition and data transfer Dr John Kalomiros Assis. Professor Department of Post Graduate studies in Communications and Informatics

More information

Color 7 click. PID: MIKROE 3062 Weight: 19 g

Color 7 click. PID: MIKROE 3062 Weight: 19 g Color 7 click PID: MIKROE 3062 Weight: 19 g Color 7 click is a very accurate color sensing Click board which features the TCS3472 color light to digital converter with IR filter, from ams. It contains

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

unsigned char ReadADC() { /************* start A/D, read from an A/D channel *****************/ unsigned char ADC_VALUE;

unsigned char ReadADC() { /************* start A/D, read from an A/D channel *****************/ unsigned char ADC_VALUE; /*********************************************************************************************/ /* BME 361 Biomeasurement Lab - PIC18F4525BT Demo */ /* Laboratories 1-8: A/D, D/A, LCD display, ECG simulation,

More information

Application Note One Wire Digital Output. 1 Introduction. 2 Electrical Parameters for One Wire Interface. 3 Start and Data Transmission

Application Note One Wire Digital Output. 1 Introduction. 2 Electrical Parameters for One Wire Interface. 3 Start and Data Transmission Application Note One Wire Digital Output 1 Introduction The pressure transmitter automatically outputs pressure data, and when appropriate temperature data, in a fixed interval. The host simply waits for

More information

An Introduction to Designing Ham Radio Projects with PIC Microcontrollers. George Zafiropoulos KJ6VU

An Introduction to Designing Ham Radio Projects with PIC Microcontrollers. George Zafiropoulos KJ6VU An Introduction to Designing Ham Radio Projects with PIC Microcontrollers George Zafiropoulos KJ6VU Topics Ham radio applications Microcontroller basics Hardware design examples Implementing your design

More information

Lecture (04) PIC 16F84A programming I

Lecture (04) PIC 16F84A programming I Lecture (04) PIC 16F84A programming I Dr. Ahmed M. ElShafee ١ Agenda Introduction to PIC16F84A programming using C language Preprocessors and, Compiler directives Constants Variables and data types Pointers

More information

Breeze Board. Type B. User Manual.

Breeze Board. Type B. User Manual. Breeze Board Type B User Manual www.dizzy.co.za Contents Introduction... 3 Overview Top... 4 Overview Bottom... 5 Getting Started (USB Bootloader)... 6 Power Circuitry... 7 USB... 8 Microcontroller...

More information

ELCT 912: Advanced Embedded Systems

ELCT 912: Advanced Embedded Systems ELCT 912: Advanced Embedded Systems Lecture 10: Applications for Programming PIC18 in C Dr. Mohamed Abd El Ghany, Department of Electronics and Electrical Engineering Programming the PIC18 to transfer

More information

Speed Control of a DC Motor using Digital Control

Speed Control of a DC Motor using Digital Control Speed Control of a DC Motor using Digital Control The scope of this project is threefold. The first part of the project is to control an LCD display and use it as part of a digital tachometer. Secondly,

More information

eip-24/100 Embedded TCP/IP 10/100-BaseT Network Module Features Description Applications

eip-24/100 Embedded TCP/IP 10/100-BaseT Network Module Features Description Applications Embedded TCP/IP 10/100-BaseT Network Module Features 16-bit Microcontroller with Enhanced Flash program memory and static RAM data memory On board 10/100Mbps Ethernet controller, and RJ45 jack for network

More information

KPIC-0818P (V050919) Devices Included in this Data sheet: KPIC-0818P

KPIC-0818P (V050919) Devices Included in this Data sheet: KPIC-0818P Devices Included in this Data sheet: KPIC-0818P Features: Carefully designed prototyping area Accepts 8 pin PIC12 series micro-controllers Accepts 14 and 18 Pin PIC16 series Accepts some 8,14 and 18 pin

More information

PIC-MICRO-WEB development board User's manual

PIC-MICRO-WEB development board User's manual PIC-MICRO-WEB development board User's manual Rev. E, January 2014 Copyright(c) 2011, OLIMEX Ltd, All rights reserved Page 1 INTRODUCTION: This small and compact board will give you the opportunity to

More information

SimPLC. User Manual.

SimPLC. User Manual. SimPLC User Manual www.dizzy.co.za Contents Introduction... 4 Overview Top... 5 Power Circuitry... 6 Microcontroller... 7 Real-Time Calendar and Clock (RTCC)... 7 Reset Button... 7 Oscillator Socket...

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

WiMOD LR Base Plus Host Controller Interface

WiMOD LR Base Plus Host Controller Interface WiMOD LR Base Plus Host Controller Interface Specification Version 1.2 Document ID: 4000/40140/0125 IMST GmbH Carl-Friedrich-Gauß-Str. 2-4 47475 KAMP-LINTFORT GERMANY Introduction Document Information

More information

Rev 1.3, Air-Farm User Manual. CO2 / Temperature / Humidity Transmitter

Rev 1.3, Air-Farm User Manual. CO2 / Temperature / Humidity Transmitter Rev 1.3, 2018-06 Air-Farm User Manual CO2 / Temperature / Humidity Transmitter Features CO2, Temperature and Humidity measurement Three high sensitivity sensors RS485(MODBUS) Communication Analog Voltage

More information

EM RF Transceiver. - Framer and Digital Interface Control

EM RF Transceiver. - Framer and Digital Interface Control Application Notes EM198810 RF Transceiver - Framer and igital Interface Control Introduction This Application Note describes the detailed packet handling details pertaining to the Elan EM198810. For the

More information

CONTENTS. dspicpro4 KEY FEATURES 4 CONNECTING THE SYSTEM 5 INTRODUCTION 6

CONTENTS. dspicpro4 KEY FEATURES 4 CONNECTING THE SYSTEM 5 INTRODUCTION 6 CONTENTS dspicpro4 KEY FEATURES 4 CONNECTING THE SYSTEM 5 INTRODUCTION 6 Switches and Jumpers 7 MCU Sockets 8 Power Supply 10 On-Board USB 2.0 Programmer 11 MikroICD 12 RS-232 Communication Circuit 13

More information

Homework 5: Circuit Design and Theory of Operation Due: Friday, February 24, at NOON

Homework 5: Circuit Design and Theory of Operation Due: Friday, February 24, at NOON Homework 5: Circuit Design and Theory of Operation Due: Friday, February 24, at NOON Team Code Name: Motion Tracking Laser Platform Group No.: 9 Team Member Completing This Homework: David Kristof NOTE:

More information

Freescale Semiconductor, I

Freescale Semiconductor, I nc. Application Note Rev. 0, 4/2004 Software Drivers for Tango3 RF Transmitter and Romeo2 RF Receiver ICs By John Logan 8/16-Bit Division East Kilbride, Scotland Introduction This application note describes

More information

Capacitive Touch Remote Control Reference Design User s Guide

Capacitive Touch Remote Control Reference Design User s Guide Capacitive Touch Remote Control Reference Design User s Guide Microchip Korea V0.8-page 1 Capacitive Touch Remote Control Reference Design User s Guide Table of Contents Chapter 1. Introduction 1.1 Introduction

More information

Serial Peripheral Interface Bus SPI

Serial Peripheral Interface Bus SPI Serial Peripheral Interface Bus SPI SPI Bus Developed by Motorola in the mid 1980 s Full-duplex, master-slave serial bus suited to data streaming applications for embedded systems Existing peripheral busses

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

CPE 323 Introduction to Embedded Computer Systems: MSP430 System Architecture An Overview

CPE 323 Introduction to Embedded Computer Systems: MSP430 System Architecture An Overview CPE 323 Introduction to Embedded Computer Systems: MSP430 System Architecture An Overview Aleksandar Milenkovic Electrical and Computer Engineering The University of Alabama in Huntsville milenka@ece.uah.edu

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

Flow Charts and Assembler Programs

Flow Charts and Assembler Programs Flow Charts and Assembler Programs Flow Charts: A flow chart is a graphical way to display how a program works (i.e. the algorithm). The purpose of a flow chart is to make the program easier to understand.

More information

DEV-1 HamStack Development Board

DEV-1 HamStack Development Board Sierra Radio Systems DEV-1 HamStack Development Board Reference Manual Version 1.0 Contents Introduction Hardware Compiler overview Program structure Code examples Sample projects For more information,

More information

RF4431 wireless transceiver module

RF4431 wireless transceiver module RF4431 wireless transceiver module 1. Description RF4431 adopts Silicon Labs Si4431 RF chip, which is a highly integrated wireless ISM band transceiver chip. Extremely high receive sensitivity (-121 dbm)

More information

Development Hardware. Target Board and In-circuit Debugger

Development Hardware. Target Board and In-circuit Debugger Development Hardware Target Board and In-circuit Debugger Development Hardware :: Slide 1 of 32 Microchip PICDEM 2 Plus Target Board Development Hardware :: Slide 2 of 32 PICDEM 2 Plus Demo Board Development

More information

Interrupts and Serial Communication on the PIC18F8520

Interrupts and Serial Communication on the PIC18F8520 Interrupts and Serial Communication on the PIC18F8520 Kyle Persohn COEN 4720 Fall 2011 Marquette University 6 October 2011 Outline 1 Background Serial Communication PIC18 Interrupt System 2 Customizing

More information

Lab 5: LCD and A/D: Digital Voltmeter

Lab 5: LCD and A/D: Digital Voltmeter Page 1/5 OBJECTIVES Learn how to use C (as an alternative to Assembly) in your programs. Learn how to control and interface an LCD panel to a microprocessor. Learn how to use analog-to-digital conversion

More information

Transcendent Frequency Counter

Transcendent Frequency Counter Transcendent Frequency Counter with blue 2 x 16 LCD display This manual will guide you how to assemble, test and operate this frequency counter KIT. Features: The transcendent counter has two input channels

More information

WiMOD LR Base Host Controller Interface

WiMOD LR Base Host Controller Interface WiMOD LR Base Host Controller Interface Specification Version 1.7 Document ID: 4100/40140/0062 IMST GmbH Carl-Friedrich-Gauß-Str. 2-4 47475 KAMP-LINTFORT GERMANY Introduction Document Information File

More information

PIC-I/O Multifunction I/O Controller

PIC-I/O Multifunction I/O Controller J R KERR AUTOMATION ENGINEERING PIC-I/O Multifunction I/O Controller The PIC-I/O multifunction I/O controller is compatible with the PIC-SERVO and PIC-STEP motor control modules and provides the following

More information

Messaging Strategies for a Remote Temperature and Pressure Monitor

Messaging Strategies for a Remote Temperature and Pressure Monitor Messaging Strategies for a Remote Temperature and Pressure Monitor BY Donnie Garcia - Applications Engineer Semiconductor 6501 William Cannon Austin, TX 78749 United States 512-895-3081 E-Mail: Donnie.Garcia@.com

More information

Using Timers of Microchip PIC18F Microcontrollers

Using Timers of Microchip PIC18F Microcontrollers Using Timers of Microchip PIC18F Microcontrollers ARSLAB - Autonomous and Robotic Systems Laboratory Dipartimento di Matematica e Informatica - Università di Catania, Italy santoro@dmi.unict.it L.A.P.

More information

Arduino Uno R3 INTRODUCTION

Arduino Uno R3 INTRODUCTION Arduino Uno R3 INTRODUCTION Arduino is used for building different types of electronic circuits easily using of both a physical programmable circuit board usually microcontroller and piece of code running

More information

PIC-LCD-3310 development board Users Manual

PIC-LCD-3310 development board Users Manual PIC-LCD-3310 development board Users Manual Rev.A, July 2008 Copyright(c) 2008, OLIMEX Ltd, All rights reserved INTRODUCTION: PIC-LCD-3310 is development board with PIC18F67J50, NOKIA 3310 BW 84x48 pixels

More information

Embedded Systems. PIC16F84A Internal Architecture. Eng. Anis Nazer First Semester

Embedded Systems. PIC16F84A Internal Architecture. Eng. Anis Nazer First Semester Embedded Systems PIC16F84A Internal Architecture Eng. Anis Nazer First Semester 2017-2018 Review Computer system basic components? CPU? Memory? I/O? buses? Instruction? Program? Instruction set? CISC,

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

Timer0..Timer3. Interrupt Description Input Conditions Enable Flag

Timer0..Timer3. Interrupt Description Input Conditions Enable Flag Timer0..Timer3 Timers are pretty useful: likewise, Microchip provides four different timers for you to use. Like all interrupts, you have to Enable the interrupt, Set the conditions of the interrupt, and

More information

CHAPTER 6 CONCLUSION AND SCOPE FOR FUTURE WORK

CHAPTER 6 CONCLUSION AND SCOPE FOR FUTURE WORK 134 CHAPTER 6 CONCLUSION AND SCOPE FOR FUTURE WORK 6.1 CONCLUSION Many industrial processes such as assembly lines have to operate at different speeds for different products. Process control may demand

More information

Features 2.4 GHz Carrier Frequency RS232 UART interface with variable baud rate Input supply voltage: 5V to 12V 255 possible Channels frequencies (0 to 255) Programmable Device Address (255 per channel)

More information

TP6836. USB 2.4G RF Dongle. Data Sheet

TP6836. USB 2.4G RF Dongle. Data Sheet TP6836 Data Sheet tenx reserves the right to change or discontinue the manual and online documentation to this product herein to improve reliability, function or design without further notice. tenx does

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

Tic-Tac-Toe with mtouch. Version 1.0. June Cytron Technologies Sdn. Bhd.

Tic-Tac-Toe with mtouch. Version 1.0. June Cytron Technologies Sdn. Bhd. Tic-Tac-Toe with mtouch PR28 Version 1.0 June 2010 Cytron Technologies Sdn. Bhd. Information contained in this publication regarding device applications and the like is intended through suggestion only

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

Xbee module configuration from a µcontroller

Xbee module configuration from a µcontroller APPLICATION NOTE AN_P12AB04_1 Xbee module configuration from a µcontroller Soulier Baptiste Polytech Clermont Ferrand 2012-2013 The purpose of this application note is to explain how to configure the main

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

Lab 5: LCD and A/D: Digital Voltmeter

Lab 5: LCD and A/D: Digital Voltmeter Page 1/5 OBJECTIVES Learn how to use C (as an alternative to Assembly) in your programs. Learn how to control and interface an LCD panel to a microprocessor. Learn how to use analog-to-digital conversion

More information

BME 361 Biomeasurement Laboratory Demonstration Biomedical Engineering Program University of Rhode Island June 10, 2015

BME 361 Biomeasurement Laboratory Demonstration Biomedical Engineering Program University of Rhode Island June 10, 2015 BME 361 Biomeasurement Laboratory Demonstration Biomedical Engineering Program University of Rhode Island June 10, 2015 The functional units on this demonstration bread board include a PIC18F4525 processor,

More information

Final Design Report 19 April Project Title: Pneumatic Exercise Machine

Final Design Report 19 April Project Title: Pneumatic Exercise Machine EEL 4924 Electrical Engineering Design (Senior Design) Final Design Report 19 April 2011 Project Title: Pneumatic Exercise Machine Team Members: Gino Tozzi Seok Hyun John Yun Project Abstract The goal

More information

University of Hawaii EE 361L MPLab Quick Tutorial and Project 2.1 Last updated September 1, 2011

University of Hawaii EE 361L MPLab Quick Tutorial and Project 2.1 Last updated September 1, 2011 University of Hawaii EE 361L MPLab Quick Tutorial and Project 2.1 Last updated September 1, 2011 This is a quick tutorial of programming the PIC 16F684A processor using the MPLab Integrated Development

More information

HX4002 HX1001. White LED Backlighting Li-Ion Battery Backup Supplies Local 3V to 5V Conversion Smart Card Readers PCMCIA Local 5V Supplies

HX4002 HX1001. White LED Backlighting Li-Ion Battery Backup Supplies Local 3V to 5V Conversion Smart Card Readers PCMCIA Local 5V Supplies HX1001 Low Noise, Regulated Charge Pump DC/DC Converter Features Fixed 5V±4% Output VIN Range: 2.7V ~ 5V Output Current: up to 250mA (V IN =4.5V) Low Noise Constant Frequency Operation Shutdown Current:

More information

Capture Mode of Pic18F252

Capture Mode of Pic18F252 Capture Mode of Pic18F252 PIC18F253 has two Capture/Compare/Pulse Width Modulation modules. Some devices such as ADCs, Sensors (position, velocity, accelearstion, temperature [MAX6577 converts the ambient

More information

UNCA CSCI 255 Exam 3 Fall 2011

UNCA CSCI 255 Exam 3 Fall 2011 UNCA CSCI 255 Exam 3 Fall 2011 This is a closed book and closed notes exam. Laptops, cell phones, and any other electronic storage or communication devices may not be used during this exam. Name: KEY If

More information