This file contains hidden or 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
/* Project: Unit 01 - IO | |
File: unit_01_09_WPUR.c | |
Objective: For PIC18F4520: | |
PORTB can be software programmed for internal weak pull-ups on all inputs | |
For PIC18F45K202: | |
Each of the PORTB pins has an individually controlled | |
weak internal pull-up. When set, each bit of the WPUB | |
register enables the corresponding pin pull-up. When | |
cleared, the RBPU bit of the INTCON2 register enables |
This file contains hidden or 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
/* Project: Unit 01 - IO | |
File: unit_01_08_RandomFlashing_LED.c | |
Objective: RANDOM FLASHING LEDS: The program uses a pseudorandom number generator to generate | |
a number between 0 and 32767. This number is then divided by 128 to limit it between 1 and 255. | |
The resultant number is sent to PORTB of the microcontroller. This process is repeated every second. | |
In this project 8 LEDs are connected to PORTB of a PIC18F452O microcontroller operated @ 8 MHz crystal. | |
NOTE: Enable C_Stdlib and C_Type libs on mikroC Pro for PIC's Library Manager \o/ |
This file contains hidden or 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
/* Project: Unit 01 - IO | |
File: unit_01_07_ComplexFlashing_LED.c | |
Objective: COMPLEX FLASHING LED: The program flashes the LED connuously with | |
the following pattern: 3 flashes with 200 ms delay between each flash 2 s delay; | |
the result closely resemble a red flashing lights from an ambulance or fire engine; | |
this project an LEDs is connected to port pin RB0 of a PIC18F4520 microcontroller | |
operated from an 8 MHz crystal (on microgenios board set sw1 switch 10 = leds on PORTB) | |
This file contains hidden or 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
/* Project: Unit 01 - IO | |
File: unit_01_06_DoubleChasing_LED.c | |
Objective: DOUBLE CHASING LEDS - The LEDs chase each other in both directions. | |
cIn this project 8 LEDs are connected to PORTB | |
of a PIC18F4520 (or PIC18F45K22) microcontroller and | |
the microcontroller is operated from an 8 MHz crystal. | |
Author: microgenios, edited by J3 |
This file contains hidden or 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
/* Project: Unit 01 - IO | |
File: unit_01_05_Chasing_LED.c | |
Objective: CHASING LEDS-The program turns ON the LEDs in an an clockwise | |
manner with .1s delay between each output. | |
The net result is that LEDs seem to be chasing each other. | |
In this project 8 LEDs are connected to PORTB | |
(on microgenios board set sw1 dip = 10, LEDs on PORTB); | |
of a PIC18F4520 (or PIC18F45K22) microcontroller and | |
the microcontroller is operated from an 8 MHz crystal. |
This file contains hidden or 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
/* Project: Unit 01 - IO | |
Code: unit_01_04_pushAndIncrementCounter.c | |
Objective: While pressing RB0's button we increment a counter and | |
the LED's attached on RD<7:0> will lighting in a serie:); | |
One button control eight LEDs; Note there is a flow control; AWESOME:) | |
In this project 8 LEDs are connected to PORTD and 8 buttons are on PORTB | |
of PIC18F4520 uC, running under 8 MHZ crystal | |
(on microgenios board set sw1 dip = 9, LEDs on PORTD); |
This file contains hidden or 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
/* Project: Unit 01 - IO | |
Code: unit_01_03_pushAndBlinkAndDebounce.c | |
Objective: Blinking LED attached on PORTD's Pin 0; Now we're using flag variables to control | |
the flow on/off LED:) while pressing a button on PORTB's Pin 0 (Momentary button); | |
In this project 8 LEDs are connected to PORTD and 8 buttons are on PORTB | |
of PIC18F4520 uC, running under 8 MHZ crystal (set sw1 dip = 9, LEDs on PORTD); | |
Author: microgenios, edited by J3 |
This file contains hidden or 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
/* Project: Unit 01 - IO | |
Code: unit_01_02_pushAndBlinkAnLED.c | |
Objective: This project we're blinking an LED attached on PORTD's reg. bit 0 | |
while pressing a button on PORTB's reg. bit 0 (Momentary button); | |
8 LEDs are connected to PORTD & 8 buttons are on PORTB of PIC18F4520 uC, | |
running under 8 MHZ crystal (set sw1 dip = 9, LEDs on PORTD); | |
Author: microgenios, edited by J3 |
This file contains hidden or 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
/* Project: Unit 01 - IO | |
Code: unit_01_01_blinkingLED.c | |
Objective: Let's blink an LED on PORTD's bit 0 and config Button on PORTB's bit 0 | |
as input (KEY) for future implementation :) | |
In my board 8 LEDs are connected to PORTD and 8 buttons are on PORTB | |
of PIC18F4520 uC, running under 8 MHZ crystal (set sw1 dip = 9, LEDs on PORTD); | |
Author: microgenios, edited by J3 | |
PIC Lessons: How to Start to Program PIC 18 - Step-by-step for Beginners! | |
Hardware: Development Boards (OPTIONS): |
This file contains hidden or 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
/* Project: LEGO Episode # 29 | |
Bridging All Sensors Together — Pitbot | |
Collecting All Codes for the Final Act of Giving Behaviors to Robot | |
INO File: _29_VNH2SP30_MosterMoto_Test_01.ino | |
MonsterMoto Shield Example Sketch | |
date: 5/24/11 | |
code by: Jim Lindblom | |
hardware by: Nate Bernstein | |
SparkFun Electronics |