Вы находитесь на странице: 1из 2

' ---------------------

[���������]----------------------------------------------------
'
' ����......proj02PRO.bas
' ������....PicBasic Pro
' ����......������� ����� ��� ����������� PIC16F876
' �����.....��� ��������
' ������....25 �� 1999 ����
' �������...
'
'
' ---------------------[��������
���������]-------------------------------------------
' ��� ��������� �������� ������������ ����-������ �������� ����� � ������� ��
������
' �����������. ������ �� ����������� �������� �� 1 �������, � ����� ���������.
' �������� � ������� ��������� �������� ���������� ����� ����, ��� ���������
' ����������. ��� ����������� �� ��� ���, ���� ��������� �� ��������� ��� ������
' �����������, � ����� ����������� �������� �� ���������������. ����� �������
' ��������� �������� ��������� ���� ����-������.
' ��� ���������� ��������� � ������� ����� PORTB, ��� ��������� �����������
���������
' ���������. ����������� ������� ����� �������� ����� ����� ������������,
�����������
' ��� �������� �������� � ���� ����.
' ---------------------[��������� � �������
PBPro]-------------------------------------

Define LOADER_USED 1 ' ��� ������ ����� ������ ���� �� �������� PIC-
����������������
' ����������� ��������� ���������

LED var Byte ' ���������� ���������-���� LED

PortB = %00000000 ' �������� � 0 ��� ������ ����� PORTB (���������


�������������)

TrisB = %00000000 ' ���������������� ��� ������ ����� PORTB ��� ������

main: ' ����� ������ �������� ���������

' *********************��������
������**************************************************

for LED = 0 to 7 ' ��������� �� ������� ��� ����������

portb.0[LED] = 1 ' �� ������ ����� ����� PORTB ������ ������� �������


(+5 �),
' ����� ������ ���������

pause 1000 ' ����� 1000 ����������� (1 �������), ���� ����� ���������

portb.0[LED] = 0 ' �� ������ ����� ����� PORTB ������ ������ �������


(0 �),
' ����� �������� ���������

next ' ����������, ���� ��� 7 �� ������� �� ������


����
' **********************�������� �����*********************************************

for LED = 7 to 0 step -1 ' ��������� �� ������� ��� ����������


' � ������� �������

portb.0[LED] = 1 ' �� ������ ����� ����� PORTB ������ �������


������� (+5 �),
' ����� ������ ���������

pause 1000 ' ����� 1000 ����������� (1 �������), ���� �����


���������

portb.0[LED] = 0 ' �� ������ ����� ����� PORTB ������ ������


������� (0 �),
' ����� �������� ���������

next ' ����������, ���� ��� 7 �� ������� ��


������ ����

goto main ' ������� � ����� ������ ���������, ����� ���


���������� �����
' � �����

END ' ��� ������ �������� �� ����������, �� ����� ����� ��� ��� �����
' �� ������, ���� ��������� ������� � ������ ������ ���-�� �� ��

Вам также может понравиться

  • Proj15pbc Bas
    Proj15pbc Bas
    Документ3 страницы
    Proj15pbc Bas
    insomnium86
    Оценок пока нет
  • Proj10pro Bas
    Proj10pro Bas
    Документ2 страницы
    Proj10pro Bas
    insomnium86
    Оценок пока нет
  • Proj03pbc Bas
    Proj03pbc Bas
    Документ2 страницы
    Proj03pbc Bas
    insomnium86
    Оценок пока нет
  • Proj15pro Bas
    Proj15pro Bas
    Документ3 страницы
    Proj15pro Bas
    insomnium86
    Оценок пока нет
  • Proj13pbc Bas
    Proj13pbc Bas
    Документ2 страницы
    Proj13pbc Bas
    insomnium86
    Оценок пока нет
  • Proj12pbc Bas
    Proj12pbc Bas
    Документ2 страницы
    Proj12pbc Bas
    insomnium86
    Оценок пока нет
  • Proj09pro Bas
    Proj09pro Bas
    Документ4 страницы
    Proj09pro Bas
    insomnium86
    Оценок пока нет
  • Proj06pro Bas
    Proj06pro Bas
    Документ2 страницы
    Proj06pro Bas
    insomnium86
    Оценок пока нет
  • Proj09pbc Bas
    Proj09pbc Bas
    Документ5 страниц
    Proj09pbc Bas
    insomnium86
    Оценок пока нет
  • Proj10pbc Bas
    Proj10pbc Bas
    Документ2 страницы
    Proj10pbc Bas
    insomnium86
    Оценок пока нет
  • Proj13pro Bas
    Proj13pro Bas
    Документ3 страницы
    Proj13pro Bas
    insomnium86
    Оценок пока нет
  • Proj03pro Bas
    Proj03pro Bas
    Документ2 страницы
    Proj03pro Bas
    insomnium86
    Оценок пока нет
  • Proj04pro Bas
    Proj04pro Bas
    Документ1 страница
    Proj04pro Bas
    insomnium86
    Оценок пока нет
  • Proj08pbc Bas
    Proj08pbc Bas
    Документ3 страницы
    Proj08pbc Bas
    insomnium86
    Оценок пока нет
  • Proj05pbc Bas
    Proj05pbc Bas
    Документ3 страницы
    Proj05pbc Bas
    insomnium86
    Оценок пока нет
  • Proj07pro Bas
    Proj07pro Bas
    Документ2 страницы
    Proj07pro Bas
    insomnium86
    Оценок пока нет
  • Proj01pro Bas
    Proj01pro Bas
    Документ1 страница
    Proj01pro Bas
    insomnium86
    Оценок пока нет
  • Proj14pro Bas
    Proj14pro Bas
    Документ3 страницы
    Proj14pro Bas
    insomnium86
    Оценок пока нет
  • Proj01pbc Bas
    Proj01pbc Bas
    Документ1 страница
    Proj01pbc Bas
    insomnium86
    Оценок пока нет
  • Proj11pro Bas
    Proj11pro Bas
    Документ2 страницы
    Proj11pro Bas
    insomnium86
    Оценок пока нет
  • Proj04pbc Bas
    Proj04pbc Bas
    Документ1 страница
    Proj04pbc Bas
    insomnium86
    Оценок пока нет
  • Proj02pbc Bas
    Proj02pbc Bas
    Документ2 страницы
    Proj02pbc Bas
    insomnium86
    Оценок пока нет
  • Proj06pbc Bas
    Proj06pbc Bas
    Документ2 страницы
    Proj06pbc Bas
    insomnium86
    Оценок пока нет
  • Proj05pro Bas
    Proj05pro Bas
    Документ2 страницы
    Proj05pro Bas
    insomnium86
    Оценок пока нет
  • Proj12pro Bas
    Proj12pro Bas
    Документ2 страницы
    Proj12pro Bas
    insomnium86
    Оценок пока нет
  • Proj11pbc Bas
    Proj11pbc Bas
    Документ2 страницы
    Proj11pbc Bas
    insomnium86
    Оценок пока нет
  • Proj07pbc Bas
    Proj07pbc Bas
    Документ3 страницы
    Proj07pbc Bas
    insomnium86
    Оценок пока нет
  • Proj14pbc Bas
    Proj14pbc Bas
    Документ3 страницы
    Proj14pbc Bas
    insomnium86
    Оценок пока нет
  • Proj08pro Bas
    Proj08pro Bas
    Документ3 страницы
    Proj08pro Bas
    insomnium86
    Оценок пока нет