Services

Programming Microcontrollers By C

Summary:

using many programs like Mlap,Keil,Mikroc PIC ,Mikroc PIc,Mikroc 8051 to write codes by c language for microcontroller

Work History

Second line engineer

May 2012 - February 2013

Maitenance of A\Cs

Technical supply engineer

May 2012 - February 2013

I changed the store system from manual documentation to computer database(it was my idea and I Designed the Database).

Teacher at the courses for new engineers, pilots and technicians

January 2012 - February 2013

Courses:
- Technical supply - High Level Aviation Academy.
- Safety precautions - High Level Aviation Academy.
- Aviation safety - High Level Aviation Academy.
- Trainer of trainees
- Engineering practice - High Level Aviation Academy.
- Human factor - High Level Aviation Academy.

SKILLS:
- MS: Word- Excel- Power point - Internet Explorer
- Engineering applications - Autocad-Gambit-fluent-Proteus-keil-Rocksim-Aerolab-spacecad.
- Work under pressure and for long shifts (military nature).
- Developer of C language programs for microcontroller.
Language:
- Arabic
- English

Mechanic maintenance engineer

Sudan air force

From October 2010

010 to2/2013 Sudan air force

Ground equipment engineer assistance

October 2010 - May 2012

8 Hrs of A\cs maintenance

First line engineer

October 2010 - May 2012

Projects

another line follower

// DESIGNED BY MOSAB

void main() {
TRISD = 0; // PORTB is output
PORTD = 0xFF; // Initialize PORTD
ADCON1 = 7; // all ADC pins to digital I/O
PORTA = 255;
TRISA = 255; // configure PORTA pins as input
PORTC = 0; // set PORTC to 0
TRISC = 0;
TRISD = 0;
PWM_Init(1000);
PWM2_Start();
PWM1_Start(); // start PWM1

while (1) {

switch(PORTA){
case(0b0000): // 0000
PWM1_Change_Duty(0); // stop
PWM2_Change_Duty(0);
break;
case(0b0110): // 0110
PWM1_Change_Duty(50); // move forward
PWM2_Change_Duty(50);
break;
case(0b0011): // 0011
PWM1_Change_Duty(30); // move right slow
PWM2_Change_Duty(0);
break;
case(0b0001): // 0001
PWM1_Change_Duty(40); // move right fast
PWM2_Change_Duty(0);
break;
case(0b1100): // 1100
PWM1_Change_Duty(0); // move left slow
PWM2_Change_Duty(30);
break;
case(0b1000): // 0001
PWM1_Change_Duty(0); // move left fast
PWM2_Change_Duty(40);
break;
}
}
}


DC motor speed control with grafic speed level

this is code
// microcontroller : P16F877A
// Designed by:
//1- First lieutenant engineer: Mosab Ahmed Osman Ahmed


int long j,left,right,start;
void InitMain() {
ADCON1 = 6; // All ADC pins to digital I/O
PORTA=0;
TRISA = 0;
PORTC=0;
TRISC = 0;
PORTB=0;
TRISB = 0b00000000;
PORTD = 255;
TRISD = 255;
PORTE=0;
TRISE = 0;
Pwm1_Init(5000); // Initialize PWM module
Pwm2_Init(5000);
}
void main() {
InitMain();
Pwm1_Start(); // Start PWM
Pwm2_Start();
while (1) {
if(PORTD.F4==0){ // Check start button status
start=1;
left=1;
}
if(PORTD.F2==0&&start==1){ // Check left button status
left=1;
right=0;
}
if(PORTD.F3==0&&start==1){ // Check right button status
left=0;
right=1;
}
if(left==1&&start==1){ // Generate PWM for left
Pwm1_Change_Duty(j);
Pwm2_Change_Duty(0);
}
if(right==1&&start==1){ // Generate PWM for right
Pwm1_Change_Duty(0);
Pwm2_Change_Duty(j);
}
if (PORTD.F0==0&&start==1){ // Check increase speed button status
j = j < 255 ? j + 1 : 255;
Delay_ms(1);
}
if (PORTD.F1==0&&start==1){ // // Check decrease speed button status
j = j > 0? j - 1 : 0;
Delay_ms(1);
}
if (start==1){ // start led on
PORTB.F0=1 ;
}
if (left==1){ // left led on
PORTB.F1=1 ;
}
if (right==1){ // right led on
PORTB.F2=1 ;
}
if (j>25&&j<=52){ // 10% led on
PORTA=0b00000001 ;
}
if (j>52&&j<=77){ // 20% led on
PORTA=0b00000011 ;
}
if (j>77&&j<=102){ // 30% leds on
PORTA=0b00000111 ;
}
if (j>102&&j<=128){ // 40% led on
PORTA=0b00001111 ;
}
if (j>128&&j<=154){ // 50% led on
PORTA=0b00011111 ;
PORTE.F0=1;
}
if (j>154&&j<=179){ // 60% led on
PORTA=0b00111111 ;
PORTE.F0=1;
}
if (j>179&&j<205){ // 70% led on
PORTA=0b00111111 ;
PORTE.F0=1;
PORTB.F3=1;
}
if (j>205&&j<=230){ // 80% led on
PORTA=0b00111111 ;
PORTE.F0=1;
PORTB.F3=1;
PORTC.F3=1;
}
if (j>230&&j<=254){ // 90% led on
PORTA=0b00111111 ;
PORTE.F0=1;
PORTB.F3=1;
PORTC.F3=1;
PORTC.F0=1;
}
if (j>254&&j<=256){ // 100% led on
PORTA=0b00111111 ;
PORTE.F0=1;
PORTB.F3=1;
PORTC.F3=1;
PORTC.F0=1;
PORTB.F7=1;
}
}
}

line follower Robot

this is the code
// DESIGNED BY Hammo
unsigned int speed , dir,steerpot,steer,left,i;
//move forword levels of motor speed PWM Generator
void speedone(void){

PORTB.F0=0;
Delay_us(177);
PORTB.F0=1;
Delay_us(20) ;

}
void speedtow(void){

PORTB.F0=0;
Delay_us(157);
PORTB.F0=1;
Delay_us(40) ;
}
void speedthree(void){

PORTB.F0=0;
Delay_us(137);
PORTB.F0=1;
Delay_us(60) ;
}
void speedfour(void){

PORTB.F0=0;
Delay_us(117);
PORTB.F0=1;
Delay_us(80) ;
}
void speedfive(void){

PORTB.F0=0;
Delay_us(97);
PORTB.F0=1;
Delay_us(100) ;
}
void speedsix(void){

PORTB.F0=0;
Delay_us(77);
PORTB.F0=1;
Delay_us(120) ;
}
void speedseven(void){

PORTB.F0=0;
Delay_us(57);
PORTB.F0=1;
Delay_us(140) ;
}
void speedeight(void){

PORTB.F0=0;
Delay_us(37);
PORTB.F0=1;
Delay_us(160) ;
}
void speednine(void){

PORTB.F0=0;
Delay_us(17);
PORTB.F0=1;
Delay_us(180) ;
}
void speedten(void){

PORTB.F0=1;
}
void moveforword (void) { // speed buttons sequence
if(PORTD.F4==1&&PORTD.F5==0&&PORTD.F6==1&&PORTD.F7==0)
speedten();
else if(PORTD.F4==1&&PORTD.F5==0&&PORTD.F6==0&&PORTD.F7==1)
speednine();
else if(PORTD.F4==1&&PORTD.F5==0&&PORTD.F6==0&&PORTD.F7==0)
speedeight();
else if(PORTD.F4==0&&PORTD.F5==1&&PORTD.F6==1&&PORTD.F7==1)
speedseven();
else if(PORTD.F4==0&&PORTD.F5==1&&PORTD.F6==1&&PORTD.F7==0)
speedsix();
else if(PORTD.F4==0&&PORTD.F5==1&&PORTD.F6==0&&PORTD.F7==1)
speedfive();
else if(PORTD.F4==0&&PORTD.F5==1&&PORTD.F6==0&&PORTD.F7==0)
speedfour();
else if(PORTD.F4==0&&PORTD.F5==0&&PORTD.F6==1&&PORTD.F7==1)
speedthree();
else if(PORTD.F4==0&&PORTD.F5==0&&PORTD.F6==1&&PORTD.F7==0)
speedtow();
else if(PORTD.F4==0&&PORTD.F5==0&&PORTD.F6==0&&PORTD.F7==1)
speedone();
}



void main() {
TRISB = 0;
PORTB=0;
TRISC = 0;
PORTC=0;
TRISD = 255;
ADCON1 = 0; // all ADC pins to digital I/O
TRISA = 255;

Pwm1_Init(5000);
Pwm1_Start();
Pwm2_Init(5000);
Pwm2_Start();
steerpot = Adc_Read(0); // Get results of AD0 conversion
steer=steerpot/4;
while (1) {
dir = Adc_Read(1);
for(i=0;i<50;i++){
moveforword();
}
if(PORTD.F0==0&&PORTD.F1==1&&PORTD.F2==1&&PORTD.F3==0) {
PORTB.F2=0; //LEDS ON
PORTB.F3=0;
if(dir>517){
Pwm1_Change_Duty(steer); //move steer function
Pwm2_Change_Duty(0);
}
else if(dir<507){
Pwm2_Change_Duty(steer); //move steer right function
Pwm1_Change_Duty(0);
}
else if (dir<517&&dir>507) {
Pwm2_Change_Duty(0);
Pwm1_Change_Duty(0);
}
}
//move left small 484
if(PORTD.F0==0&PORTD.F1==1&PORTD.F2==0&PORTD.F3==0) {
PORTB.F2=1; //LEFT LED ON
PORTB.F3=0;
if(dir>490){
Pwm1_Change_Duty(steer); //move steer function
}
if(dir<478){
Pwm2_Change_Duty(steer); //move steer right function
}
if (dir<490&&dir>478)
Pwm2_Change_Duty(0); //move steer right function
Pwm1_Change_Duty(0); //move steer left function
}
//move left medium 456
else if(PORTD.F0==1&PORTD.F1==1&PORTD.F2==0&PORTD.F3==0) {
PORTB.F2=1; //LEFT LED ON
PORTB.F3=0;
if(dir>462){
Pwm1_Change_Duty(steer); //move steer function
}
if(dir<450){
Pwm2_Change_Duty(steer); //move steer right function
}
if (dir<462&&dir>450)
Pwm2_Change_Duty(0); //move steer right function
Pwm1_Change_Duty(0); //move steer left function
}
//move left large 427
else if(PORTD.F0==1&PORTD.F1==0&PORTD.F2==0&PORTD.F3==0) {
PORTB.F2=1; //LEFT LED ON
PORTB.F3=0;
if(dir>433){
Pwm1_Change_Duty(steer); //move steer function
Pwm2_Change_Duty(1);
}
else if(dir<421){
Pwm1_Change_Duty(1);
Pwm2_Change_Duty(steer); //move steer right function
}
else if (dir<433&&dir>421)
Pwm2_Change_Duty(steer); //move steer right function
Pwm1_Change_Duty(steer); //move steer left function
}
else
PORTB.F2=0;
//move right small 540
if(PORTD.F0==0&PORTD.F1==0&PORTD.F2==1&PORTD.F3==0) {
PORTB.F2=0; //RIGHT LED ON
PORTB.F3=1;
if(dir>545){
Pwm1_Change_Duty(steer); //move steer function
}
if(dir<535){
Pwm2_Change_Duty(steer); //move steer right function
}
if (dir<545&&dir>535)
Pwm2_Change_Duty(0); //move steer right function
Pwm1_Change_Duty(0); //move steer left function
}
//move right meduim 568
else if(PORTD.F0==0&PORTD.F1==0&PORTD.F2==1&PORTD.F3==1) {
PORTB.F2=0; //RIGHT LED ON
PORTB.F3=1;
if(dir<562){
Pwm1_Change_Duty(steer); //move steer function
}
if(dir>574){
Pwm2_Change_Duty(steer); //move steer right function
}
if (dir<574&&dir>562)
Pwm2_Change_Duty(0); //move steer right function
Pwm1_Change_Duty(0); //move steer left function
}
//move right large 597
else if(PORTD.F0==0&PORTD.F1==0&PORTD.F2==0&PORTD.F3==1) {
PORTB.F2=0; //RIGHT LED ON
PORTB.F3=1;
if(dir<590){
Pwm1_Change_Duty(steer); //move steer left function
}
if(dir>603){
Pwm2_Change_Duty(steer); //move steer right function
}
if (dir<603&&dir>590)
Pwm2_Change_Duty(0); //move steer right function
Pwm1_Change_Duty(0); //move steer left function
}
else if(PORTD.F0==0&PORTD.F1==0&PORTD.F2==0&PORTD.F3==0) {
PORTB.F2=1; //BACKWORD LED ON
PORTB.F3=1;
Delay_ms(100);
while(PORTD.F0==0&PORTD.F1==0&PORTD.F2==0&PORTD.F3==0){
PORTB.F1=1;
Delay_us(20);
PORTB.F1=0;
Delay_us(177) ;
if(dir>517){
Pwm1_Change_Duty(steer); //move steer function
Pwm2_Change_Duty(0);
}
else if(dir<507){
Pwm2_Change_Duty(steer); //move steer right function
Pwm1_Change_Duty(0);
}
else if (dir<517&&dir>507) {
Pwm2_Change_Duty(0);
Pwm1_Change_Duty(0);
}

}
}
else{
PORTB.F2=0; //LEDS OFF
PORTB.F3=0;}
}
}
//the right corner of circuit diagram buttons is represent IR sensor

Qualifications & Certifications

Mechanical Aviation Engineering

Karary University

Sudan-new halfa sugar factory

Skillpages has been acquired by Bark.com!

Bark.com is pioneering the way people find local services. Skillpages is the world’s premier directory of service providers.

Find out more

Mosab Diab provides the following services:


Supported Countries
Choose your country

×