• Tech Ads

Digital gain control of Opamp.

The gain of U1 can be controlled by a digital binary 1248 nibble at ABC. The gain at digital 000 is unity or 1 and the gain at various stages are set by 4051.

Precision Attenuator with Digital Control – delabs

There are eight different gains as the steps of gain resistor network is chosen by 4051. The on resistance of 4051 channel around 100E gets added to U1 pin 2 internal impedance.

Digital gain control of Opamp

Auto ranging 4-1/2 Digit Digital Voltmeter – delabs

You can use separate resistor networks with trimpots for each channel if you require but keep the networks total burden on U1 pin 6 to around 10K, not less than than. You can use this to set the gain of a amplifier with the help of a microcontroller.

Interface a uC to PC RS232 with MAX232A

This is the standard configuration on how to Interface a uC like 8051 to PC RS232 with MAX232A. The UART or Serial port was not present in 8049/8749 chips which were the ancestors of 8051/8031. Pages of code were needed to make a software UART in MCS-48. The 8051 integrated the hardware UART and short commands made it tick. The most important innovation which made uC popular was the C in 80C31. C is for CMOS. This made the chip work cooler and work on even batteries and small power supplies.

80C51, SBC, Firmware and Circuits

The 8749 and 8751 are the UV EPROM type of uC. With limited erase/write cycles. The FLASH revolution changed every thing, you could update firmware over a phone line modem. Even without Ethernet, the firmware could be updated by making every embedded device a node on the EPABX. Now TCP/IP and Wi-Fi makes it all very easy.

Interface a uC to PC RS232 with MAX232A
Read also –

555 watchdog for uC and uP systems

When the microcontroller hangs due to a spike, EMI or RFI etc. the 7555 will reset the uC, if proper power supply design is done above circuit can also give a clean power on reset, the above circuit you should modify to suit your design.

80C39-8749 MCS-48 Examples and code

Better still use a uC with watchdog built in like some atmel chips, or use the watchdog chips from maxim which can also do RAM battery management.

The circuit was developed over a old TI application note, 7555 i think fairchild may be making it, 7555 is CMOS version of 555 timer, advantage of 7555 is that it can go to higher frequency, low power consumption, the disadvantage is its output drive mA is not as good as 555. now why i put it here was that you can see how charge and discharge paths are separated with diodes.

555 watchdog for uC and uP systems

See Larger Circuit. 555 Watchdog
Edit the circuit eagle cad file del00013.zip,

RS232 with Opto-Isolation

I had to once interface an high voltage circuit to PC, The uC had to communicate thru RS232–Comm port–Serial Port.

Part of the 80C31 8051 SBC

Even though i had isolation at the sensors and actuators to make doubly sure the PC also has been isolated. There are chips that are available for this purpose, The circuit above is built with discrete and passive components except for the opto 4N35. You can use MCT2E and CNY17-3 Optos too. For MCT2E some tweak may be needed as current transfer ratio is 20, for the other two CTR is 100 so above design will work.
RS232 with Opto-Isolation

The circuit derives power from PC but does not load the PC supply. Any voltage above 5V applied to the PC connectors may lead to damage of motherboard in PC. Old PCs were more vulnerable but PCs today maybe a bit rugged at the Ports. Due to internal current limits and clamping.

The VCC, VDD and Agnd are derived from PC no other power needs to be applied on PC side of opto. On uC side of opto the uC power supply lines +5 and gnd has to be used. There is no copper link between the two sides and depending on opto a 1KV isolation is possible if PCB is well designed. The PCB should show the visual isolation above and components should be laid on separate areas of PCB to prevent creepage.

The LEDs are to indicate the port activity Rx and Tx, they are not required once testing is over. The circuit can be simpler, but this worked for me and it is not tested at very-high buad rates.

The levels of RS232 are not TTL like 0-5 we have both polarities +10 and -10. The circuit has to change that to drive the Opto Leds.

RS232 software. Understanding RS232 Serial Port Communication.