







Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!








DAC0830/DAC0832 8-Bit
μP Compatible, Double-Buffered D to A Converter Data Sheet, National Semiconductor Corp., March 2002. http://www.national.com/ds/DA/DAC0830.pdf.
DAC0830/DAC0832 8-Bit
μP Compatible, Double-Buffered D to A Converter Data Sheet, National Semiconductor Corp., March 2002. http://www.national.com/ds/DA/DAC0830.pdf.
DAC0830/DAC0832 8-Bit
μP Compatible, Double-Buffered D to A Converter Data Sheet, National Semiconductor Corp., March 2002. http://www.national.com/ds/DA/DAC0830.pdf.
-^ First write the value to the inputregister.•^ Second transfer the input register to the^ DAC register
void main(void){
{ unsigned char count = 0;DDRP^
= 0xFF;^
/* configure Port P for output */ DDRM^
|= 0x0F;^
/* configure Port M for output */ PTP^
= count;^
/* Output the first count value to Port P*/ PTM^
|= 0x03;^
/* Perform fast DAC trasnfers WR2,XFER low */ while (1) {PTP^
= count;^
// output the next data value PTM^ &= ~(0x01);
// deassert CS PTM^ &=^ (0x02);
// deassert WR PTM^ &= ~(0x02);
// deassert WR asm(“nop”);^
// wait 125 nsec asm(“nop”);^
// wait 250 nsec asm(“nop”);^
// wait 375 nsec PTM^ |= 0x02;
// assert WR1| PTM^ |= 0x01;
// assert CS (CS must hold longer than WR1) count++;^
// sawtooth sequence