Question: Create ASM code routines labelled seglkup and segoutca that will match the de- scription(s) provided. Retrieve pattern for 7-segment display Label: seglkup INPUT An


Create ASM code routines labelled seglkup and segoutca that will match the

Create ASM code routines labelled seglkup and segoutca that will match the de- scription(s) provided. Retrieve pattern for 7-segment display Label: seglkup INPUT An 4-bit value in the lower nibble of the working register OUTPUT The equivalent 8-bit pattern for a 7-segment common-cathode display in the working register PROCESS Computed-goto (Lookup table) seglkupStep1 Mask the value in the working register to clear all bits in the upper nibble (Hint: AND with OXOF) seglkupStep2 Add the value in the Working Register to the PCL register, answer in the PCL register (Remember to BANKSEL first!!) seglkupStep3 leave routine with value based on the value that was in the working register (Hint: use a list of retlw statements) Output pattern on 7-segment common-anode display Label: segoutca INPUT An 8-bit pattern for a common-cathode display in the working register; PORTD pins are configured as outputs and are connected to a common-anode display OUTPUT The equivalent pattern for a 7-segment common-anode display is placed on PORTD PROCESS Invert pattern and place on PORTD segoutcaStep1 Invert the pattern in the working register (Hint: XOR with OXFF) segoutcaStep2 move the value from the working register to PORTD(Remember to BANKSEL first!!) segoutcaStep3 leave routine

Step by Step Solution

3.50 Rating (160 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Electrical Engineering Questions!