Closed digitaldanny closed 3 years ago
The waveforms look very similar now, and I am still having trouble with the demo on the LCD. I believe my issues now may be a misunderstanding of how the functions pgm_read_word
and pgm_read_byte
work on the Arduino. Here are the definitions from the avr-libc documentation.
#define pgm_read_byte (address_short ) pgm_read_byte_near(address_short)
Read a byte from the program space with a 16-bit (near) address.
#define pgm_read_word_near | ( | | address_short | ) | __LPM_word((uint16_t)(address_short))
The address is a byte (8-bit) address. The address is in the program space.
According to the documentation, near addresses are 16-bit addresses. Far addresses are 32-bit addresses. Right now, I am still trying to figure out how to adjust my code to reflect this in the demo program.
Demo works correctly after adding word-addressing support.
Referencing the code in this repo for implementing basic graphics drivers on the LCD. Some of the functions are already implemented as shown in the table below.
oled96 Repo Function Name | MSP432 Function Name |
---|---|
oledWriteCommand(unsigned char c) | SPI_sendCommand(uint8_t command) |
|
oledSetPosition(int x, int y) | Set_Address(uint8_t column, uint8_t page) |
Other functions I am writing based on this repo are listed below. | oled96 Repo Function Name | MSP432 Function Name |
---|---|---|
oledWriteDataBlock(unsigned char* ucBuf, int iLen) |
? | |
oledSetPixel(int x, int y, unsigned char ucColor) |
Not implemented yet | |
oledWriteString(int x, int y, char *szMsg, int iSize) |
? |
Completed
Todo