Ex: No: Date:: To Write A Program To Initialize The Port in GENERIC Microcontroller
Ex: No: Date:: To Write A Program To Initialize The Port in GENERIC Microcontroller
Ex: No: Date:: To Write A Program To Initialize The Port in GENERIC Microcontroller
AIM:
APPARATUS REQUIRED:
2. Keil vision4 1
ALGORITHM:
Thus the port was initialized and the corresponding output was analyzed
using Keil software.
AIM:
APPARATUS REQUIRED:
2. Keil vision4 1
ALGORITHM:
Thus the Square wave pulse was generated and corresponding waveform
was obtained using Keil software.
AIM:
To generate the gate pulse to AC motor drive using ATMEL microcontroller.
APPARATUS REQUIRED:
2. Keil vision4 1
ALGORITHM:
#include<reg51.h> MTR=1;
sbit sw_1=P2^7; for(x=0;x<300;x++);
sbit sw_2=P2^6; MTR=0;
sbit sw_3=P2^5; for(x=0;x<600;x++);
sbit MTR=P1^0; }
void main() if(sw_1==1&sw_2==1&sw_3==1)
{ {
int x; MTR=1;
while(1) for(x=0;x<300;x++);
{ MTR=0;
if(sw_1==0&sw_2==0&sw_3==0) for(x=0;x<300;x++);
{ }
MTR=1; if(sw_1==1&sw_2==0&sw_3==0)
for(x=0;x<5;x++); {
MTR=0; MTR=1;
for(x=0;x<600;x++); for(x=0;x<600;x++);
} MTR=0;
if(sw_1==0&sw_2==0&sw_3==1) for(x=0;x<200;x++);
{ }
MTR=1; if(sw_1==1&sw_2==0&sw_3==1)
for(x=0;x<200;x++); {
MTR=0; MTR=1;
for(x=0;x<600;x++); }
} }
if(sw_1==0&sw_2==1&sw_3==0) }
{
RESULT OBSERVATION:
RESULT:
Thus the PWM pulse was generated & corresponding generated pulse was analysed
using keil software.
AIM:
APPARATUS REQUIRED:
ALGORITHM:
AIM:
APPARATUS REQUIRED:
ALGORITHM:
AIM:
To control the direction of the dc motor using PIC18F4550 both in clockwise&
anticlockwise direction.
APPARATUS REQUIRED:
ALGORITHM:
STEP 1: open micro C pro PIC v.6.0.0.
STEP 2: File->new->new project->enter the project name, select devices name->next.
STEP 3: Write the coding of the corresponding program needed to be executed .
STEP 4: Go to build->build the program.
STEP 5: Open My Computer->E drive->program->Mikro electronic Mikro PRO for PIC.open
with notepad(HEX file was created).
STEP 6: Go to tools->mikro boot loader->connect->choose HEX file->connect the kit.
STEP 7: Verify the output.
AIM:
To generate &control the PWM signals using P1854550.
APPARATUS REQUIRED:
3. Digital oscilloscope(50MHz,1GSa/S)Storage 1
ALGORITHM:
STEP 1: open micro C pro PIC v.6.0.0.
STEP 2: File-> new->new project->Enter project name,select device name->next.
STEP 3: Write the program.
STEP 4: Go to build-> build the program.
STEP 5: Open My Computer->E drive->program->Mikro electronic Mikro PRO for PIC.Open
with notepad (HEX file was created).
STEP 6:.Go to tools->mikro boot loader->connect->choose HEX file->connect the kit.
STEP 7: Verify the output.
RESULTS OBSERVATION:
AIM:
To control the stepper motor using PIC18F4550 embedded microcontroller .
APPARATUS REQUIRED:
ALGORITHM:
STEP 1: open micro C pro PIC v.6.0.0.
STEP 2: File->new->new project->enter the project name, select devices name->next.
STEP 3: Write the coding of the corresponding program needed to be executed .
STEP 4: Go to build->build the program.
STEP 5: Open My Computer->E drive->program->Mikro electronic Mikro PRO for
PIC. Open with notepad(HEX file was created).
STEP 6: Go to tools-> mikro boot loader->connect->choose HEX file->connect the kit.
STEP 7: Verify the output.
AIM:
To interface DAC with pic microcontroller and to obtain the output through led
APPARATUS REQUIRED:
ALGORITHM:
Thus the DAC was interface with the pic microcontroller and the output was obtain through
the led by the constant wavevalues.
AIM:
To interface ADC with pic microcontroller and to obtain the digital output
APPARATUS REQUIRED:
ALGORITHM:
char *text;
int t;
char temp;
char lcd[] = "000";
void main()
{
ADCON0=0x0F; //Turn off A/D convertor at A0
ADCON1=0x0B; //Configure all inputs as digital I/O except A0
ADCON2=0b10001010;
TRISD=0x00; // Configure PortD as output port
PORTD.F4=1; // LCD Backlight On
Lcd_Init();
Lcd_Cmd(_LCD_CURSOR_OFF);
Lcd_Cmd(_LCD_CLEAR);
Lcd_out(1,1, "Temperature:");
Lcd_out(2,4, "C");
do
{
t = ADC_Read(3);
t = t * 0.4887;
temp = t%10;
lcd[2] = temp + '0';
t = t/10;
temp = t%10;
lcd[1] = temp + '0';
Lcd_out(2,1,lcd);
Delay_ms(200);
}while(1);
}