Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The following PIC code displays a countdown with a 1-second interval, in the spirit of Prac 1. start: call LCD_init movlw d'100' movwf count

  

The following PIC code displays a countdown with a 1-second interval, in the spirit of Prac 1. start: call LCD_init movlw d'100' movwf count again: call LCD clear movf count, w call LCD BCD call delay_1sec decfsz count bra again call LCD_clear call LCD blastoff idle: bra idle ; clear LCD ;; show "Blastoff!" on LCD LCD_blastoff: ;; show" and holding" on LCD LCD_holding Modify the program so that if PBO is pressed the count stops (bit 0 of PORTB goes low when the button is pressed) with the display showing the current count and the message" and holding" (assume subroutine LCD_holding displays a suitable message). When PBO is released, the count should continue. You'll need to initialise PORTB so that you can read the switch as input.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Digital Systems Design Using Verilog

Authors: Charles Roth, Lizy K. John, Byeong Kil Lee

1st edition

1285051076, 978-1285051079

Students also viewed these Programming questions