somf0872
Member level 5
winavr bitwise two constants
Hi everybody,
I have to develop a routine for AVR ATMega162 in C-language (C-compiler WINAVR) which does the following operation:
1) PB1.1 as an output pin giving a regular clock pulse with a frequency of 20MHz i.e (high level = 25ns and low level = 25ns).
2) PB1.2 as an output pin that gives a data (it could be any data 1 or 0) for total 12 clock pulses.
3) Usually PB1.3 is on high state
When 12 bits of data is send on PB1.2 with 12 clock pulses on PB1.1, then I have to make PB1.3 low for 25ns from its original high state.
Does anyone can guide me how to proceed with this outline? Actually I am new in the world of Microcontroller programming. Need some push up or similar example sort of codes from experts.
Note: I am working on DAC8043A in which serial data is clocked into the input register on the rising edge of the CLOCK pulse. When the new data word has been
clocked in, it is loaded into the DAC register with the LD input pin. Data in the DAC register is converted to an output current by the D/A converter.
Any help?
--X--
Hi everybody,
I have to develop a routine for AVR ATMega162 in C-language (C-compiler WINAVR) which does the following operation:
1) PB1.1 as an output pin giving a regular clock pulse with a frequency of 20MHz i.e (high level = 25ns and low level = 25ns).
2) PB1.2 as an output pin that gives a data (it could be any data 1 or 0) for total 12 clock pulses.
3) Usually PB1.3 is on high state
When 12 bits of data is send on PB1.2 with 12 clock pulses on PB1.1, then I have to make PB1.3 low for 25ns from its original high state.
Does anyone can guide me how to proceed with this outline? Actually I am new in the world of Microcontroller programming. Need some push up or similar example sort of codes from experts.
Note: I am working on DAC8043A in which serial data is clocked into the input register on the rising edge of the CLOCK pulse. When the new data word has been
clocked in, it is loaded into the DAC register with the LD input pin. Data in the DAC register is converted to an output current by the D/A converter.
Any help?
--X--