USB UART (2)
setting the port currents
Published in issue 306, January 2002
Although the Elektor Electronics USB interface described in the September 2000 issue allows the port current to be set for only one port, the port IC allows the current to be set for each pin.The module USBuart.bas provides the subroutine Sub WrIsink Pin, Wert. The parameter Pin may have a value of 0 through 7 for port pins P00 through P07 or 8 through 11 for port pins P10 through P13. Listing 1 shows a simple program for setting the sink currents of all four Port 1 outputs, while Figure 1 shows the associated screen display.The microcontroller contains a simple 4-bit DAC for each port pin, consisting of four weighted current sources. We can ask ourselves if we can’t use this for something more worthwhile than just controlling the brightness of a few LEDs.
010207-12.zip
Free download 010207-13.zip
Free download 010207-11.zip
Free download
|
Click below to download a PDF copy of this article from Elektor magazine.
Please note. In view of the complexity of international markets, Elektor cannot guarantee the availability of components for this project.
|