ME461 Prelab4 Solution - 7. c-b-a-f-h-g-f-g 8. UCB0CTL1 =...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
1. UART Asynchronous, full duplex, 2 wires with TX and RX SPI: Synchronous, full duplex, 4 wires with SIMO, SOMI, SCLK and SS I 2 C: Synchronous, half duplex, 2 wires with SDA and SCL 2. 3. UCTXBUF accepts serial data to be sent, UCRXBUF contains data received. These registers are 8 bit wide. In SPI mode transmission of serial data is triggered by writing to UCTXBUF. 4. The TX ISR is called when data is removed from UCTXBUF to transmit shift register. The RX ISR is called when data is received and moved from receive shift register to UCRXBUF. 5. Set the reference voltage as Vcc/2 6. V = 2*v_ref*code/2 n Thus, code = 3.0*1024/(1.65*2) = 931 = 11 1010 0011 In fast mode the data would be 0100 1110 1000 1100 according to the data format of DAC
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 7. c-b-a-f-h-g-f-g 8. UCB0CTL1 = UCSSEL_2 + UCSWRST; //SMCLK, reset registers UCB0CTL0 = UCCKPH + //data changed on falling d edge, captured on rising edge UCCKPL + //the inactive state is high UCMSB + //MSB first UCMST+ //Master mode UCMODE_0 + //3-Pin SPI UCSYNC //Synchronous UCB0BR0 =16; UCB0BR1=0; //Together gives a prescaler of 16 P3SEL |=0x0A; //Select P3.1 and 3.3 as SIMO and CLK P3DIR |=0x01; //Select P3.0 as GPIO for FS UCB0CTL1 &= ~UCSWRST; //Disable reset IFG2 &= ~UCB0TXIFG; //Clear Flag IE2 |= UCB0TXIE; //Enable ISR 9. The Nyquist frequency of a 10 kHz signal is 5 kHz...
View Full Document

Page1 / 2

ME461 Prelab4 Solution - 7. c-b-a-f-h-g-f-g 8. UCB0CTL1 =...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online