Question: Please make this assembly code into C, this file setups the LCD and allow you to draw pixels, refresh the screen ect when the function(LCD_Pixel)

 Please make this assembly code into C, this file setups theLCD and allow you to draw pixels, refresh the screen ect whenthe function(LCD_Pixel) or (LCD_Refresh) etc is called. INCLUDE Registers.s AREA DATA, ALIGN-2LCDmat SPACE 1056 AREA LCDCODE, CODE, READONLY, ALIGN=2 EXPORT LCD_Init EXPORT LCD_Cmd_OutEXPORT LCD_Dat_Out IMPORT DelayMs EXPORT LCD_Contrast EXPORTLCD Pixel EXPORT LCD Refresh EXPORTLCD Blank CSbit EQU 0x80 RSTbit EQU 0x40 A0bit EQU 0x20 CLKbit

Please make this assembly code into C, this file setups the LCD and allow you to draw pixels, refresh the screen ect when the function(LCD_Pixel) or (LCD_Refresh) etc is called.

INCLUDE Registers.s AREA DATA, ALIGN-2 LCDmat SPACE 1056 AREA LCDCODE, CODE, READONLY, ALIGN=2 EXPORT LCD_Init EXPORT LCD_Cmd_Out EXPORT LCD_Dat_Out IMPORT DelayMs EXPORT LCD_Contrast EXPORTLCD Pixel EXPORT LCD Refresh EXPORT LCD Blank CSbit EQU 0x80 RSTbit EQU 0x40 A0bit EQU 0x20 CLKbit EQU 0x20 DATbit EQU 0x10 CSport EQU 0x400043FC RSTport EQU 0x400043FC A0port EQU 0x400043FC CLKport EQU 0x400243FC DATport EQU 0x400243FC LCD_Init ; assuming CSwrite pin0, RSTwrite pin1 PUSH LR, R0-R4) LDR RO,-CSport LDR R1, [R0] BIC R1, #(CSbit) STR R1, [R0] LDR Re, -RSTport LDR R1, [R0] BIC R1, #(RSTbit) STR R1, [R0] MOV R3, #70 BL DelayMs LDR R1, [R0] ORR R1, #(RSTbit) STR R1, [R0] MOV R3, #70 BL DelayMs ; GPIO-DATA &= ~1 CSwrite(0) ; GPIO-DATA &= ~2 RSTwrite(0) ; DelayMs (50ms) ; GPIO DATA I-2 RSTwrite(1)

Step by Step Solution

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 Databases Questions!