M. Amer Iqbal Qureshi



tải về 3.06 Mb.
Chế độ xem pdf
trang131/132
Chuyển đổi dữ liệu09.12.2022
Kích3.06 Mb.
#53945
1   ...   124   125   126   127   128   129   130   131   132
Amer Iqbal - Teach Yourself PIC Microcontrollers for Absolute Beginners-Microtronics Pakistan (2001)

    Điều hướng trang này:
  • PulsOut
Next 
Next 
Loop:
PulsOut Rowrst,2
' give a pulse on row reset pin, to select row 0 
For i=0 To 7
n=i*4 
SHOut SER,SRCLK,
lsbfirst
,[s[n], s[n +1], s[n+2], s[n+3]]
PulsOut Latch,4 
DelayMS 
SHOut SER,SRCLK,
lsbfirst
,[$FF,$FF,$FF,$FF] 
PulsOut Latch,4 
PulsOut RowClk,2 
Next 
GoTo Loop 
End 
EData $E3,$DD,$DD,$DD,$c1,$DD,$DD,$DD
' A
EData $C3,$DD,$DD,$DD,$C3,$DD,$DD,$C3
' B 
 


Teach Yourself PIC Microcontrollers | www.electronicspk.com | 144 
Microchip® MPLAB is a software, that can be downloaded free from Microchip site. As of this writing 
version 8.0 is available. MPLAB is an integrated development environment for PIC microcontrollers from 
Microchip. The platform supports native assembly language, and programs written in assembly can be di-
rectly compiled on this platform. It also supports many other supporting tools, like C17, C18, C24 etc. these 
are C language compilers available from microchip site. These compilers are integrated with MPLAB, and 
you can write software, for all supported devices, debug them, within MPLAB, see the status of various 
registers and then burn the hex file into the PIC using MPLAB supported programmers, or your own, while 
generating hex file from MPLAB. 
The MPLAB organizes your entire development as a project, which may contain various source files, linker 
libraries and so on.
One of the beautiful aspects of MPLAB is integration with microchip ICD-2. This device is both a pro-
grammer as well as in circuit debugger. Your program can be run and tested right in the target board, as 
well as stopped and you can examine its registers. 
Details of this software and Microchip ICD-2 can be found at microchip site. 
Working with MPLAB® 


Teach Yourself PIC Microcontrollers | www.electronicspk.com | 145 

rogramming a microcontroller needs a hardware device, called programmer. All programmers 
have the same basic functionality, that they accept a program (.hex) file from your PC and trans-
fers it to the program memory of microcontroller. The number of commercial designs vary in 
speed, availability of serial port, parallel port or USB and the supported devices. You have been 
using our simple, yet fully functional programmer PIC-PG-II. We also introduced you another useful de-
vice, ICD-2 which operates under Microchip MPLAB software and not only program the MPLAB sup-
ported devices but also helpful in source level debugging of the project, right in circuit. 
Microchip has introduced another technology, which has simplified the task of programming, as well as 
upgrading the firmware within your projects. This is called Self programming. Newer PIC microcontrollers, 
like 16F877 and all 18Fxxx series have this capability. If you use this technique, you do not need an exter-
nal programmer at-all. The programming is done through standard USART serial interface, which almost 
every project has. 
PIC Lab-II is equipped with this software, so that you can use direct programming without the need of in-
tervening programmer. This does not mean you should not have the programmer at hand! It still has useful 
functions. 

tải về 3.06 Mb.

Chia sẻ với bạn bè của bạn:
1   ...   124   125   126   127   128   129   130   131   132




Cơ sở dữ liệu được bảo vệ bởi bản quyền ©hocday.com 2024
được sử dụng cho việc quản lý

    Quê hương