Example LED test.pdf
(
130 KB
)
Pobierz
Example:
Provide a reference sample to the user, as shown below, posed for a
AT89S51 circuit LED experiment, the Port 1 in the AT89S51 eight external
LED, another-J1 connector, the pins are defined as Vcc, RST, SCK, MOSI,
MISO, GND.
A special attention, J1 connector pin is how to connect to AT89S51 the pin:
RST (Pin 9), MOSI (Pin 6), MISO (Pin 7), SCK (Pin 8).
USB multi-Programmer is the use of In-System Programmable (ISP) model
to programming memory, you must use the MOSI, MISO, SCK, RST, J1
connector is to be connected to a USB multi-programmer supply 5V power.
When programming is complete, perform AT89S51, these three pins can be as
general I / O Pin, absolutely no impact. When the LED test program execution,
Port 1 of the LED will follow the program set by the order of ON / OFF.
AT89S51 LED test circuit:
LED Test Program:
#include <AT89X52.H>
void delay_time(unsigned int k);
//---------------------------------------------------------------
//
Main Program
//--------------------------------------------------------------
void main (void)
{
unsigned char i=0x01;
while (1)
{
P1=i;
delay_time(50000);
i=i<<1;
if (i==0)
i=0x01;
}
// Port 1 output
// delay time
}
//--------------------------------------------------------------
//
delay time routine
//--------------------------------------------------------------
void delay_time(unsigned int k)
{
while(k>0)
k--;
}
Plik z chomika:
BMW-xxx-Power
Inne pliki z tego folderu:
images.jpg
(8 KB)
RS PORT Aspmon 4.exe
(4303 KB)
AStudio6_2_1153-readme.pdf
(368 KB)
ATmegaBOOT_8.zip
(0 KB)
avrdude-5.6-win32-bin.zip
(614 KB)
Inne foldery tego chomika:
Pliki dostępne do 01.06.2025
Pliki dostępne do 19.01.2025
3D Print [EXE]
Amlogic S805 System Tools [All]
Apps [Audio]
Zgłoś jeśli
naruszono regulamin