T
Code C - [expand] 1 2 3 4 5 6 7 8 9 10 11 For (i = 64, i=0, i--) { LATE.RE1 = 0; nop(); nop(); nop(); nop(); LATE.RE1 = 1; nop(); nop(); }
Noise bandwidth is not the clock rate rather it is the rise time that determines noise bandwidth.we just want 64 pulses of "1us high, 1 us low".
If not , then what is the fastest frequency that c can give us.?......the duty cycle is not that important, its just to send pulses to a digital pot up/down pin so that we can move the wiper of the digital pot....we have to do it quickly as we zero the pot's wiper to the end of the totem pole before setting its position..otherwise we don't now the wipers position.....and we have to do it quick otherwise we get a transient voltage unwantedly at the pot change time and a dip in the led current that's being controlled.
for(i==64;i==0;i--){
mcp4013_udout = 0;
mcp4013_udout = 0;
mcp4013_udout = 1;
mcp4013_udout = 1;
}
Hello,
I am coding C (free Microchip XC8 compiler) for PIC18F65K22. (MPLABX environment).
We wish to send a pulse train of 64 pulses (to move a wiper on a MCP4013 digital pot as quickly as possible, but slower than 400KHz)
The PIC oscillator frequency is 4MHz.
Here is the code (below). What frequency will the pulses be at?
"mcp_4013_udout" represents a pin of the micro.
I would take !MHz pulse from pin#50 (CLKO). Generate a gate pulse of 64 instruction cycles using an internal counter. "And" both pulses to get 64 cycles output.For 500kHz generation ,,you only need a 1MHz Xtal Osc on an inverter and /2 configured D FF (Q to D feedback)
its not volatile as long as the supply stays good to it, and that's fine for us.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?