Posts

Showing posts from February, 2019

serial peripheral interface

         Serial peripheral interface     #include <LPC21xx.H> void spi_data(int data) {  IOCLR0 = (1 << 7);    // CLEARING GPIO PIN  S0SPDR = data ;  while(!(S0SPSR & (1 << 7))); //CHECK STATUS , MONITOR FLAG   (AFTER DATA TRANSFER THE 7TH BIT SET)  IOSET0 = (1 << 7); } int main() {  PINSEL0 |= (1 << 8)|(1<<10)|(1 << 12); //MISO,MOSI,SCK  PINSEL0 &= ~(1 << 9)|(1<<11)|(1 << 13); //MISO,MOSI,SCK  IODIR0 |= (1 << 7);      //SS we are taking GPIO  S0SPCR = (1 << 2)|(1 <<  5); //enabling the SPI and 5 bit for master mode  S0SPCCR = 8;     //8,10,12,14 we can give given by manufacture (refer notes formula)  while(1)  {     //7 SEGMENT DISPLAY CMDS   spi_data(0x0C01);   // 0XC00-OFF,0XC01-...

READING VALUES FROM SENSOR AND THAT WRITING TO EEPROM

READING VALUES FROM SENSOR AND THAT WRITING TO EEPROM code for above tittle project  #include <LPC21xx.H> #include "lcdheader.h" static int count_num=0; void i2c_start(void) {   I2CONCLR=(1<<3);     //CLEARING SI FLAG I2CONSET=(1<<5);     //Start communication while(!(I2CONSET & (1<<3))){}   //wait for SI to go high   I2CONCLR=(1<<5); I2CONCLR=(1<<3); //CLEARING SI FLAG } void i2c_stop(void) { I2CONSET = (1<<4);//STOPPING DATA TRANSFER } char i2c_recv(void) {   int  r; I2CONCLR=(1<<3); while(!(I2CONSET & (1<<3))); r = I2DAT; //lcd_cmd(0xc0); //lcd_data(r);   return(r); } void i2c_data(unsigned char data) {   I2CONCLR=(1<<3);    //clearing SI Flag I2DAT=data;         //Sending SLAVE ADDRESS + READ/WRITE // lcd_data(data); while(!(I2CONSET ...
  Avoided accidents using can protocol through the smartwatch    Protocols: CAN, LCD Brief:     In this project, we checking initial conditions like seat belt etc after that if any case gets to sleep, increase or decrease blood pressure that will sense by smartwatch that information shares can protocol and giving a different indication to outside people and sending a message to 108 and their family members.    Hardware Used: lpc2129 development board (ARM7), Bluetooth, pulse measure sensor. Software Used: Keil µVision 4, Flash Magic code for the above project #include "header.h"                                                         ...

Smart Power management system in any management system

         Smart Power management system in any management system Protocols:    UART, RTC, LCD Brief:     We are doing this project to controlling lighting, fans etc by using mobile Bluetooth pairing to arm device HC-05 Bluetooth here working automatic particular time it will check the status of lights etc then that will send to mobile phone will you feel turn off or on that operation will be done by requested small commands from mobile. Hardware Used: lpc2129 development board (ARM7), Bluetooth module HC-05, relay, Ac bulb. Software Used: Keil µVision 4, Flash Magic code for the above project //same as 1st prg but simplyfing code we are using funtions                 #include<lpc21xx.h> #include<string.h>  void uart_tx_string(char *str);    void delay(int count) { int i,j; for(i=0;i<count;i++) { ...

Locker Security Sytem Using Humun Detect Sensor and OTP Throuhgt Bluettoth

Locker Security System Using Human Detect Sensor and OTP Through    Bluetooth Protocols :    UART, RTC   Brief:     We are providing locker security system using human detect sensor will detect a particular person will match then it will generate random OTP that send to whatever device connected to locker Bluetooth then whatever received OTP again enter correctly in particular time if any you do not enter or incorrect OTP    locker will not open and again new OTP generated after particular time(1 min). Hardware Used: lpc2129 development board (ARM7), Bluetooth module HC-05, human detect sensor. Software Used: Keil µVision 4, Flash Magic code for the above project                #include<lpc21xx.h> #include<string.h> #include<stdlib.h>    void delay(int count) { int i,j; for(i=0;i<count;i++) { for(j=0;j<3000;j...