This question already has an answer here:
I am trying to create a PWM signal using a POT from 555 Timer to control speed of a 5V DC motor. I have a development board with a C8051F020 microcontroller, a 100K POT and an LCD display. The requirement is to generate PWM signals externally so that the microcontroller is free to do other things that needs to be done for the project. I need to use the DAC from the microcontroller to drive the 555 Timer.
Scenario: The ADC on the micro reads the value from the POT (present on the Dev board). The DAC converts it to an analog value which can be used by the 555 Timer. I cannot directly connect the pot to the Timer.
My understanding is that the ADC and DAC do not have to be physically connected together on the board. Instead the digital values sampled from the ADC can be used by the DAC through software, am I right? So my question: is it possible to connect the DAC of the microcontroller to the input (pin 7) of a 555 Timer with a level converter from 3.3V (DAC) to 5V (Timer) in between?
EDIT 4th Feb 2014
I am using LM741 OPAMP as a comparator. The Timer is configured in an astable mode. For prototyping purpose, the DAC from the microcontroller is replaced with a 100K potentiometer. Since the DAC is supposed to be the reference voltage to the comparator, I found that the LED would always light up (although very dim) because of the capacitor C1 voltage goes from 1/3*Vcc to 2/3*Vcc which is why the LED was dim because the lowest voltage was 1/3*Vcc = 1/3*5 = 1.67V. So I switched the terminals for the comparator and now the reference voltage is C1 (capacitor voltage) as shown in the schematic below. My questions: 1) Is it alright to replace DAC with a potentiometer to represent DAC voltage as the voltage from the POT? 2). Is it wrong to switch the terminals around? I tested it with inverted terminals and the LED completely switched off and glows bright when the DAC voltage (POT) is turned high up. Also tested with the motor. When the DAC is the reference voltage (pin 3 of LM741) then the motor starts up slow and cannot be stopped although the POT is all the way down. And when connected as shown in the schematic, then the motor is stopped in the beginning.