Build Yourself Flashing Message on PIC16F877A With Assembler

Guys, in this step by step instruction,
I wanna share my private experiment with PIC16F877A and assembly language,
I call it
Build yourself flashing message on PIC16F877A with assembler

Let's prepare the parts

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: The Parts Needed for This Experiment

1. PIC 16F877A chip
2. The board for PIC 16F877A
3. LCD 16x2
4. G540 chip programmer
6. Time for editing and understanding assembly

Step 2: Create the Code on MPLAB

Create the code on MPLAB
  BANKSEL TRISD; 1 for input, 0 for output
  movlw 0x00
  movwf TRISD
  movwf TRISB ;RB<7:0> are all outputs
  banksel PORTB
  clrf PORTB

  clrf PORTB ;Here RW is pulled down to ground
  ;LCD routine starts
  call delay10ms
  call delay10ms
  ;give LCD module to reset automatically
  ;Fundtion for 8-bit, 2-line display, and 5x8 dot matrix
  movlw 0x38
  call instw
  ;Display On, CUrsor On, No blinking
  movlw 0x0E ;0F would blink
  call instw
  ;DDRAM address increment by one & cursor shift to right
  movlw 0x06
  call instw
  movlw 0x01
  call instw
  movlw 0x80 ;00
  call instw
  ;WRITE DATA in the 1st position of line 1
  movlw 0x52 ;R
  call dataw
  movlw 0x49 ;I

Step 3: Test and Enjoy Yourself Message Flashing on LCD...

Test and enjoy yourself message flashing on LCD...
Video :
Epilog Challenge V

Participated in the
Epilog Challenge V

1 Person Made This Project!


  • Assistive Tech Contest

    Assistive Tech Contest
  • Reuse Contest

    Reuse Contest
  • Made with Math Contest

    Made with Math Contest



4 years ago

Still waiting for the step by step part. Is there another part here like how to set it up in MPLAB. Install header files? How it's hooked up?