Copy of Blink PIC16F84A MCU

0
Favorite
0
copy
Copy
278
Views
Copy of Blink PIC16F84A MCU

Circuit Description

Graph image for Copy of Blink PIC16F84A MCU

Circuit Graph

This represents a schematic that blinks pin 12 on the PIC16F84a MCU. For additional resources check out the links below. https://forums.ni.com/t5/Multisim-and-Ultiboard/pic-to-solenoid-valve/m-p/1810476 https://electronics.stackexchange.com/questions/134605/pin-and-port-in-microcontroller #include "pic.h" #define GreenProbe RB6 void delay( int a); #define bitset(var, bitno) ((var |= 1 << (bitno)) #define bitclr(var, bitno) ((var &= ~(1 << (bitno)) void initialize(void) { bitclr(STATUS, RP0); // set bank 0 PORTA = 0x00; // initialize PORTB = 0x00; bitset (STATUS, RP0); // set bank 1 TRISA = 0xFF; // set port a pins to input TRISB = 0x00; // set port b pins to output } void main() { initialize(); // run initialzation while(1) { GreenProbe = 0x00; // Probe is off delay(2); GreenProbe = 0xFF; // Probe is on delay(6); } } void delay(int a) { int i; int j; for( i = 0; i <a; ++i) { for(j = 0; j < 100; ++j) {} } }

There are currently no comments

Creator

SamuelSa21

1 Circuit

Date Created

3 years, 2 months ago

Last Modified

3 years, 2 months ago

Tags

  • pic
  • blink pic16f84a mcu
  • blink in c
  • pic16f84a

Circuit Copied From