Blink PIC16F84A MCU

0
Favorite
4
copy
Copy
1745
Views
Blink PIC16F84A MCU

Circuit Description

Graph image for 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

Profile image for SamuelSa21

Copy of Blink PIC16F84A MCU

SamuelSa21
Profile image for paomix

Blink PIC16F84A MCU

paomix
Profile image for carlacc

Copy of Blink PIC16F84A MCU

carlacc
Profile image for hanniacastillo10

PIC16F84A

hanniacastillo10

Creator

ni2018

3 Circuits

Date Created

6 years, 8 months ago

Last Modified

6 years, 8 months ago

Tags

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