#include<lpc214x.h> #define LCD_PORT 0x00FF0000 #define EN 1<<24 //define RS pin #define RS 1<<25 //define EN pin #define LCD_SHIFT 16 //shift data by LCD_SHIFT bits void delay() { int i,j; for(i=0;i<100;i++) for(j=0;j<1000;j++); } void LCD_strobe() //Enable pulse { delay(); IOSET1 = EN; delay(); IOCLR1 = EN; delay(); } void LCD_data(unsigned char ch) //function to send data { IOCLR1 = LCD_PORT; //clear LCD pins IOSET1 = ch<<LCD_SHIFT; //shift data and set only the data bits IOSET1 = RS; //RS =1 LCD_strobe(); //EN pulse } void LCD_cmd(unsigned char ch) //function to send command { IOCLR1 = LCD_PORT; IOSET1 = ch<<LCD_SHIFT; IOCLR1 = RS; //RS = 0 LCD_strobe(); //EN pulse } void LCD_init() { PINSEL0 = 0; //set pins as GPIO PINSEL1 = 0; PINSEL2 = 0; IODIR1 = LCD_PORT | RS | EN; //set the pins as output LCD_cmd(0x38); //8bit use both lines LCD_cmd(0x06); //Entry mode LCD_cmd(0x0C); //display ON cursor OFF LCD_cmd(0x01); //Clear display LCD_cmd(0x80); //cursor at 1st line 1st position } void LCD_display(int row, int pos, unsigned char *ch) { unsigned char temp; if(row==1) { temp = 0x80 | (pos-1); //set cursor at 1st line pos position } else { temp = 0xC0 | (pos-1); //set cursor at 2nd line pos position } LCD_cmd(temp); while(*ch) //while data is valid, display the string LCD_data(*ch++); }
Tuesday, 20 March 2018
LCD-LPC2148
GPS-LPC2148
#include<lpc214x.h> #include "stdio.h" #include "lcd.h" #include "uart.h" /* This function fetches a string from the serial port using UART_GetChar() function ** In case of GPS, the co-ordinate string starts with a character '$' ** And ends with a character '*' followed by CRC */ void GPS_string(unsigned char *temp) { unsigned int i=0; do { temp[i] = uart0_receive(); } while(temp[i++] != '*'); //while '*' character is not received, keep fetching the string temp[i] = '\0'; //add a NULL character at the end of the string } /* This function takes the latitude and longitude string pointers as the input parameters ** And displays them on the LCD in a proper fashion */ void GPS_display(unsigned char *lat, unsigned char *lon) { unsigned int i; LCD_cmd(0x84); //cursor on 1st line 5th position for(i=0;i<2;i++) LCD_data(*lat++); //display degrees LCD_data('\''); //degree symbol for(i=0;i<8;i++) //display rest of the string LCD_data(*lat++); LCD_cmd(0xC4); //cursor on 2nd line 5th position for(i=0;i<3;i++) LCD_data(*lon++); //display degrees LCD_data('\''); //degree icon for(i=0;i<8;i++) //display rest of the string LCD_data(*lon++); } /* In the main function, we will continuously keep checking the serial port for character '$' ** If the character '$' is received, fetch all the characters between '$' and '*' ** Extract the latitude and longitude details from the string and display it on the LCD ** Eg: $GPGGA,155635,3730.4379,N,02357.4137,E,1,04,5.6,3.8,M,34.5,M,,*41 */ int main() { unsigned char ch, temp[20],lat[10],lon[10]; unsigned int i=0,j=0; PINSEL0=0x00000005; LCD_init(); UartInit(9600); LCD_display(1,1,"GPS Program"); delay(); LCD_cmd(0x01); //Clear Display LCD_display(1,1,"LAT:"); LCD_display(2,1,"LON:"); while(1) { if((ch = uart0_receive()) == '$') //if '$' is received { GPS_string(temp); //fetch all characters upto '*' if(temp[2] == 'G' && temp[3] == 'G' && temp[4] == 'A') { i=0; j=0; while(temp[i++] != ','); //$GPGGA (ignore) while(temp[i++] != ','); //Time Stamp (ignore) while(temp[i] != ',') //Capture Latitude lat[j++] = temp[i++]; while(temp[i++] != ','); //North/South lat[j++] = temp[i++]; j=0; while(temp[i++] != ','); while(temp[i] != ',') //Capture Longitude lon[j++] = temp[i++]; while(temp[i++] != ','); //East/West lon[j++] = temp[i++]; //(ignore the rest part of the string) GPS_display(lat,lon); //display latitude and longitude on the LCD } } } return 0; }
GLCD-LPC2148
#include<LPC214x.h> #define CS1 1<<13 //p0.13 #define CS2 1<<14 //p0.14 #define RS 1<<25 #define EN 1<<24 #define RW 1<<12 #define GRST 1<<15 #define LCD 16 //------------------------------------------------------------------------------ // File generated by LCD Assistant // http://en.radzio.dxp.pl/bitmap_converter/ //------------------------------------------------------------------------------ unsigned char BMP [] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xE0, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xF0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFE, 0xFF, 0x7F, 0x3F, 0xFF, 0xFC, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xE0, 0xC0, 0x00, 0x00, 0x00, 0x07, 0x1F, 0xFF, 0xFC, 0xF0, 0x80, 0x00, 0x00, 0x80, 0xE0, 0xF0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xFF, 0xFF, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x70, 0x70, 0x70, 0x70, 0xF0, 0xF8, 0xFF, 0xFF, 0xEF, 0xE0, 0xE0, 0xC1, 0x1F, 0xFF, 0xFF, 0xF0, 0x80, 0x00, 0x00, 0x00, 0x30, 0xF8, 0xF0, 0xE0, 0xE0, 0xF0, 0xF8, 0x7C, 0x3C, 0x1C, 0x3C, 0x78, 0xF0, 0xE0, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x79, 0xFD, 0xF9, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xFF, 0xFF, 0xFC, 0xFE, 0xFF, 0xFF, 0xC3, 0x01, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0xFC, 0xFE, 0xFE, 0xEF, 0xFF, 0xFE, 0x7C, 0x00, 0x00, 0x00, 0x04, 0x0E, 0x0E, 0x0E, 0x0F, 0x7F, 0xFF, 0xFF, 0xCE, 0x0E, 0x0E, 0x0F, 0x0F, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x3C, 0x3F, 0x3F, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x3F, 0x7F, 0xFC, 0xE0, 0x00, 0x00, 0x01, 0x07, 0xFF, 0xFF, 0xFF, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1F, 0x3F, 0x7E, 0x70, 0x00, 0x00, 0x07, 0x7F, 0xFF, 0xFC, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x3F, 0x7F, 0x7F, 0x01, 0x03, 0x0F, 0x1F, 0x3E, 0x38, 0x00, 0x00, 0x00, 0x07, 0x1F, 0x3F, 0x3D, 0x79, 0x71, 0x70, 0x70, 0x70, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0F, 0x1F, 0x1E, 0x1C, 0x1E, 0x1C, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; void delay(void) { int i,j; for(i=0;i<100;i++) for(j=0;j<1000;j++); } void GLCD_cmd(unsigned char ch) { IO0CLR=LCD; IO0SET=ch<<16; IO1CLR=RS; IO1CLR=EN; delay(); IO1SET=EN; delay(); } void GLCD_data(unsigned char ch) { IO0CLR=LCD; IO0SET=ch<<16; IO1SET=RS; IO1CLR=EN; delay(); IO1SET=EN; delay(); } void disp(unsigned char *BMP) { int i,j; for(i=0;i<8;i++) { IO1SET=CS1; IO1CLR=CS2; GLCD_cmd(0xB8|i); GLCD_cmd(0x40); for(j=0;j<64;j++) GLCD_data(BMP[(i*128)+j]); IO1CLR=CS1; IO1SET=CS2; GLCD_cmd(0xB8|i); GLCD_cmd(0x40); for(j=64;j<128;j++) GLCD_data(BMP[(i*128)+j]); } } void GLCD_IN(void) { PINSEL0=0; PINSEL1=0; PINSEL2=0; IODIR1=RS|EN|LCD; IODIR0=RS|RW|CS1|CS2; IOSET0=CS1|CS2; IOCLR0=RS|EN; delay(); GLCD_cmd(0x3f); delay(); GLCD_cmd(0x40); delay(); GLCD_cmd(0x48); delay(); } int main() { GLCD_IN(); while(1) { disp(BMP); delay(); } }
UART-LPC2148
#include<lpc21xx.h> void int_uart0() { U0FCR=0x07; U0LCR=0x83; U0DLL=98; U0LCR=0x03; } void uart0_send(unsigned char data) { U0THR=data; while((U0LSR&0x40)==0); } void uart0_receive() { while(!(U0LSR&0x01)); uart0_send(U0RBR); } void uart_msg(unsigned char *msg) { while(*msg) { uart0_send(*msg); msg++; } } main() { PINSEL0=0x00000005; int_uart0(); uart_msg("WELCOME TO VIIT PUNE"); while(1) { uart0_receive(); } }
LCD-LPC2294
#include<LPC22xx.h> #define lcd 0x03fc0000 #define rs 0x00010000 #define rw 0x00000000 #define e 0x00020000 void delay() { int i,j; for(i=0;i<100;i++) for(j=0;j<1000;j++); } void lcd_cmd(unsigned char value) { IOCLR0=rs; IOSET0=value<<18; IOCLR0=~value<<18; IOSET0=e; delay(); IOCLR0=e; } void lcd_data(unsigned char data) { IOSET0=rs; IOSET0=data<<18; IOCLR0=~data<<18; IOSET0=e; delay(); IOCLR0=e; } void int_lcd() { IODIR0=0x03ff0000;// define as output pin p0-16 to p0-25 lcd_cmd(0x38); lcd_cmd(0x0e); lcd_cmd(0x06); lcd_cmd(0x01); lcd_cmd(0x80); } main() { int_lcd(); lcd_data('v'); lcd_data('i'); lcd_data('v'); lcd_data('e'); lcd_data('k'); }
GSM-LPC2148
#include<lpc21xx.h> void int_uart0() { U0FCR=0x07; U0LCR=0x83; U0DLL=98; U0LCR=0x03; } void uart0_send(unsigned char data) { U0THR=data; while((U0LSR&0x40)==0); } void uart_msg(unsigned char *msg) { while(*msg) { uart0_send(*msg); msg++; } } void delay(int time) { int i,j; for(i=0;i<time;i++) for(j=0;j<5000;j++); } void gsmcmdcall() { uart_msg("ATD8888788412;\r\n"); delay(20000); uart_msg("ATH\r"); delay(5000); } void msg() { uart_msg("HELLO WORLD VIVEK HERE"); } void gsmsms() { uart_msg("AT+CMGF=1\r\n"); delay(150); uart_msg("AT+CSCS=\"GSM\"\r\n"); delay(150); uart_msg("AT+CMGS=\"8888788412\"\r\n"); delay(150); msg(); uart0_send(0x1A); delay(150); } main() { PINSEL0=0x00000005; int_uart0(); gsmcmdcall(); delay(200); gsmsms(); }
Thursday, 8 March 2018
APB divider(VPB)
The APB divider determines the relationship between the processor clock (CCLK) and the
clock used by peripheral devices (PCLK). The APB divider serves two purposes. The first
is to provide peripherals with the desired PCLK via APB bus so that they can operate at
the speed chosen for the ARM processor. In order to achieve this, the APB bus may be
slowed down to 12 to 14 of the processor clock rate. Because the APB bus must work
properly at power-up (and its timing cannot be altered if it does not work since the APB
divider control registers reside on the APB bus), the default condition at reset is for the
APB bus to run at 14 of the processor clock rate. The second purpose of the APB divider
is to allow power savings when an application does not require any peripherals to run at
the full processor rate. Because the APB divider is connected to the PLL output, the PLL
remains active (if it was running) during Idle mode.
clock used by peripheral devices (PCLK). The APB divider serves two purposes. The first
is to provide peripherals with the desired PCLK via APB bus so that they can operate at
the speed chosen for the ARM processor. In order to achieve this, the APB bus may be
slowed down to 12 to 14 of the processor clock rate. Because the APB bus must work
properly at power-up (and its timing cannot be altered if it does not work since the APB
divider control registers reside on the APB bus), the default condition at reset is for the
APB bus to run at 14 of the processor clock rate. The second purpose of the APB divider
is to allow power savings when an application does not require any peripherals to run at
the full processor rate. Because the APB divider is connected to the PLL output, the PLL
remains active (if it was running) during Idle mode.
pin connect block
The pin connect block allows selected pins of the microcontroller to have more than one
function. Configuration registers control the multiplexers to allow connection between the
pin and the on chip peripherals.
Peripherals should be connected to the appropriate pins prior to being activated, and prior
to any related interrupt(s) being enabled. Activity of any enabled peripheral function that is
not mapped to a related pin should be considered undefined.
Selection of a single function on a port pin completely excludes all other functions
otherwise available on the same pin.
The only partial exception from the above rule of exclusion is the case of inputs to the A/D
converter. Regardless of the function that is selected for the port pin that also hosts the
A/D input, this A/D input can be read at any time and variations of the voltage level on this
pin will be reflected in the A/D readings. However, valid analog reading(s) can be obtained
if and only if the function of an analog input is selected. Only in this case proper interface
circuit is active in between the physical pin and the A/D module. In all other cases, a part
of digital logic necessary for the digital function to be performed will be active, and will
disrupt proper behavior of the A/D.
The direction control bit in the IO0DIR register is effective only when the
GPIO function is selected for a pin. For other functions direction is controlled
automatically.
function. Configuration registers control the multiplexers to allow connection between the
pin and the on chip peripherals.
Peripherals should be connected to the appropriate pins prior to being activated, and prior
to any related interrupt(s) being enabled. Activity of any enabled peripheral function that is
not mapped to a related pin should be considered undefined.
Selection of a single function on a port pin completely excludes all other functions
otherwise available on the same pin.
The only partial exception from the above rule of exclusion is the case of inputs to the A/D
converter. Regardless of the function that is selected for the port pin that also hosts the
A/D input, this A/D input can be read at any time and variations of the voltage level on this
pin will be reflected in the A/D readings. However, valid analog reading(s) can be obtained
if and only if the function of an analog input is selected. Only in this case proper interface
circuit is active in between the physical pin and the A/D module. In all other cases, a part
of digital logic necessary for the digital function to be performed will be active, and will
disrupt proper behavior of the A/D.
The direction control bit in the IO0DIR register is effective only when the
GPIO function is selected for a pin. For other functions direction is controlled
automatically.
Thumb set’s 16-bit instruction
The key idea behind Thumb is that of a super-reduced instruction set. Essentially, the
ARM7TDMI-S processor has two instruction sets:
• The standard 32-bit ARM set.
• A 16-bit Thumb set.
The Thumb set’s 16-bit instruction length allows it to approach twice the density of
standard ARM code while retaining most of the ARM’s performance advantage over a
traditional 16-bit processor using 16-bit registers. This is possible because Thumb code
operates on the same 32-bit register set as ARM code.
Thumb code is able to provide up to 65 % of the code size of ARM, and 160 % of the
performance of an equivalent ARM processor connected to a 16-bit memory system.
The particular flash implementation in the LPC2141/42/44/46/48 allows for full speed
execution also in ARM mode. It is recommended to program performance critical and
short code sections (such as interrupt service routines and DSP algorithms) in ARM
mode. The impact on the overall code size will be minimal but the speed can be increased
by 30 % over Thumb mode.
Sunday, 4 March 2018
SINGLE PHASE DUAL CONVERTERS
SINGLE PHASE DUAL CONVERTERS
Dual converter: The back to back connection of two fully controlled converters across the load circuit is named as Dual converter.
The single phase full converters allow only two quadrant operation with inductive loads to extent the operation to four quadrant the dual converters are used.
--> Dual converters are suitable for high power applications but not for low power applications.
*The below circuit explains 1-φ dual converters with circulating current.
*Why circulating current mode operation is efficient?
In circulating current mode
1. load current is continuous and it is fast process
2. Two converters are simultaneously operated
3. The circuit will protect with current limiting reactors
4. Average output load will be more than the load.
*The dual converters consists of two full converters one with positive and another with negative output voltages.
*for highly inductive load the dual converters will operate in four quadrant with continuous current mode.
*The delay angle varies from 0 to +2Em/π, -2Em/π
Wave forms:
The below figure shows wave forms related to single phase dual converters
-->When the circuit is fed with the supply the thyristor T1 and T2 conducts positive half cycle at converter 1 and T5, T6conducts positive half cycle at converter 2
-->For negative half cycle the thyristors T3,T4,T7,T8 are takes the active position at converter 1 and converter 2.
*For positive half cycle the current direction is given by
For converter 1: P – T1 – Lr1/2 – LOAD – T2 – N
For converter 2: N – T6 – Lr2/2 – LOAD – T5 – P
*For negative half cycle the current direction is given by
Converter 1: N – T3 – Lr1/2 – LOAD – T4 – P
Converter 2: P – T8 – Lr2/2 – LOAD – T7 – N
Subscribe to:
Posts (Atom)
PIC Course with IIT Bombay
Embedded Lab Course with PIC18F4550 by IIT Bombay 2017-18 Overview: Below course was conducted as an outreach initiative of Wadhwani Elect...

-
The APB divider determines the relationship between the processor clock (CCLK) and the clock used by peripheral devices (PCLK). The APB di...
-
VLSI Design & Technology Pune University study material Design and Implementation of 4 bit ALU using VHDL DOWNLOAD Desi...
-
#include<LPC214x.h> #define CS1 1<<13 //p0.13 #define CS2 1<<14 //p0.14 #define RS 1<<25 #d...