FAWWAZ.ALASMAR Example 7-26 Write an AVR C program to convert packed BCD 0x29 to ASCII and display the bytes on PORTB and PORTC. Solution: Iinclude <avr/io.h> AWWAZ.ALASMAR //standard AVR header int main (void) unsigned char x, yi unsigned char mybyte-0x29; DDRB DDRC 0xFF ORTB x I 0x30: ymybyte & 0xFO PORTC y I 0x301 return 01 //make Ports B and C output //mask upper 4 bits //make it ASCII //mask lower 4 bits 1/shift it
PayPal Gateway not configured
PayPal Gateway not configured