Created
January 17, 2013 15:27
-
-
Save thebadger412/4556728 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/******************************************************************************/ | |
/* ____ _ _ _____ */ | |
/* | _ \ ___ | |__ ___ | |_ |___ / */ | |
/* | |_) / _ \| '_ \ / _ \| __| |_ \ */ | |
/* | _ < (_) | |_) | (_) | |_ ___) | */ | |
/* |_| \_\___/|_.__/ \___/ \__| |____/ */ | |
/* By Sam Walsh */ | |
/* */ | |
/******************************************************************************/ | |
/******************************************************************************/ | |
/* Introduction */ | |
/* */ | |
/* This code is an example of what students will create during the second */ | |
/* Year embedded systems project. Where they are expected to design and build */ | |
/* a line following robot. */ | |
/* */ | |
/* As the hardware is the same for all students (bar the sensor) this code */ | |
/* with modifications to the connection variables and sensor readings should */ | |
/* work on any students design. */ | |
/* */ | |
/* Hardware used */ | |
/* */ | |
/* PIC 18F8722 Microcontroller */ | |
/* Motor controller board (Made in house - School of EEE */ | |
/* Sensor Board (Custom to every student, used 8 Photo-transistors (digital) */ | |
/* */ | |
/******************************************************************************/ | |
/******************************************************************************/ | |
/* What is connected and where? */ | |
/* */ | |
/* Line sensors => PORTE (entire 0-7) */ | |
/* Front sensor => PORTD bit 7 */ | |
/* Motor Left PWM => PORTG bit 4 (called PWM5 in Microchip methods) */ | |
/* Motor Right PWM => PORTG bit 5 (called PWM4 in Microchip methods) */ | |
/* */ | |
/* Motor-Controller connections */ | |
/* */ | |
/* Uni-Polar Right => LATJbits.LATJ0 */ | |
/* Uni-Polar Left => LATJbits.LATJ2 */ | |
/* Bi-Polar Right => LATJbits.LATJ0 */ | |
/* Bi-Polar Left => LATJbits.LATJ0 */ | |
/* Clockwise Right => LATJbits.LATJ1 */ | |
/* Counter-Clockwise Right => LATJbits.LATJ1 */ | |
/* Clockwise Left => LATJbits.LATJ3 */ | |
/* Counter-Clockwise Left => LATJbits.LATJ3 */ | |
/* Enable => LATJbits.LATJ4 */ | |
/* Disable => LATJbits.LATJ4 */ | |
/* */ | |
/******************************************************************************/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment