490 likes | 930 Views
Serial Communication. Key Concepts and Terms bit rate and baud rate simplex, half duplex, full duplex Synchronous vs. Async Space vs. Mark UART, USART. Basic Music Synthesizer. Speaker. Microprocessor System. Lab10: Our Version of a Music Synthesizer. MSP430. LCD. Audio in.
E N D
Key Concepts and Terms bit rate and baud rate simplex, half duplex, full duplex Synchronous vs. Async Space vs. Mark UART, USART
Basic Music Synthesizer Speaker Microprocessor System
Lab10: Our Version of a Music Synthesizer MSP430 LCD Audio in P4.4 Amp Freq=440Hz PC USB-> UART P5.6 P5.7 USB UART USB “a”
PC Mini USB cable ¼’’ audio cable
Tasks to complete the lab: MCU PC LCD Send a character from PC to MCU using UART. 2. Generate a digital signal. 3. Display status to LCD. Divide the problem into smaller pieces, division of labor.
Issue 1: UART PC MCU LCD Send a character from PC to MCU using UART. UART USB MCU PC USB->UART UART USB MCU P5.6 P5.7 TUSB3410UF
Issue 2: Square wave MCU PC LCD 2. Generate a digital signal.
Frequencies of musical notes Where For example, Note: for the lab, you may use a look-up table or math.h.
What is the difference between a DSP-based system and ours? MCU data[15:0] 16-bit Data Bus “analog” out MCU 1-bit Data line Amp LPF
DSP system Our system POUT=fundamental CLK=25Xfund
Tasks to complete the lab: MCU PC LCD 3. Display status to LCD.
LCD Examples halLcdPrintLine(“Hi86", 1, 0x04); Hi86
By using a string char string[]=“Hi86”; halLcdPrintLine(string, 1, 0x04); Hi86
By using a character array char string[]={‘H’,’i’,’8’,’6’,’\0’}; halLcdPrintLine(string, 1, 0x04); Hi86
By using a pointer char string[]={‘H’,’i’,’8’,’6’,’\0’}; char *stringPtr= &string[0] halLcdPrintLine(stringPtr, 1, 0x04); Hi86
By using a more pointers char string[]={‘H’,’i’}; char *stringPtr= &string[0] char nums[]={‘8’,’6’,’\0’}; char *numsPtr=&nums[0]; numsPtr++; (*numsPtr)++; halLcdPrintLine(stringPtr, 1, 0x04); ! Hi87