Question: / / Write a two digit hex value at row number row void writeHexToLCD ( unsigned char hex, int row ) { unsigned char temp

// Write a two digit hex value at row number row void writeHexToLCD(unsigned char hex, int row){ unsigned char temp_L;
unsigned char temp_H;
temp_H = hex & 0xF0;
temp__H = temp_H >>4;
if (temp_H>9){
temp_H +=037;
} else {
temp_H +=030;
}
temp_L = hex & 0x0F;
if (temp_L>9){
temp_L +=037;
} else {
temp_L +=030;
}
unsigned char cursor = row ==1?085:0 C 5 ;
setCursor(cursor);
writeChar(temp_H);
writeChar(temp_L);
writeChar('h');
}
 // Write a two digit hex value at row number row

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!