|
|||||
Refer to the figure titled Figure #1 - Printer Port Test Circuitry. This illustrates a very simple test fixture to allow you to figure out what inversions are taking place in the hardware associated with the printer port. 3.1.1. Basic Turn On and Off 8 LED Program test_output1.pas turns the 8 LED's on and then off on 8 bit port Data. In this experiment, we used two button to control 8 LED to turn on or off. Note that an LED is turned off with a logic one. Delphi Programming ( download file exp311.zip )
procedure TLED.Button1Click(Sender: TObject); procedure TLED.Button2Click(Sender: TObject); begin asm mov dx,$378 mov al,11111111b out dx,al end; end; After inserting those instruction then hit F9 on your keyboard to run the program, then you'll see picture as shown in the bellow Click on Turn On button to turn on 8 LED that connected to Port Data, and click on Turn Off to turn off 8 LED. |
Free Software Lesson 1 Lesson
4
|
||||