Everyday Practical Electronics - EPE PIC Tutorial Vol 2 Part III.pdf


文档分类:管理/人力资源 | 页数:约16页 举报非法文档有奖
1/ 16
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/ 16
文档列表 文档介绍
SUPPLEMENT
FREE
EPE PIC
TUTORIAL V2
JOHN BECKER PART THREE
Quite simply the easiest
low-cost way to learn
about using PIC EPE PIC
Microcontrollers! TUTORIAL
In this final part we look at some of the
more sophisticated aspects of using PICs,
and highlight some differences between the
’84 and the ’87x and ’62x families.
EFERRING back to Listing 30 and which the main part is shown in Listing 30,
Program TK3TUT30 of Part 2 last LISTING 30A is considerably pact.
Rmonth, we continue examining the SWAPF STORE2,W ; get tens After initialisation and general set-up,
program for a 24-hour clock displayed on the program enters the MAIN routine. At
ANDLW 15 1
an alphanumeric . ADDLW 48 each /25th second time-out, CLKADD is
called and the T counter decre-
TIME OUT TO . CALL LCDOUT
MOVF STORE2,W ; get units mented, as we saw earlier. Only if the
As with 7-segment . clock counting ANDLW 15 value of T is zero is the next rou-
routines, with the . program the ADDLW 48 tine entered. After resetting T, the
numerical values are held as BCD counts CALL LCDOUT address of CLKSEC is set in the indirect
and each digit is, of course, between 0 and MOVLW ‘:’; insert colon address register FSR, a loop (LOOP) is set
9 decimal. To the ., though, values 0 to CALL LCDOUT for three operations and STORE1 is
9 represent the characters which it holds at cleared for use as an up-counter. In the
its character register addresses 0 to 9, three steps round the loop, CLKSEC is
which is not the same thing. The .’s holds the result in W, putting the tens into dealt with first, then CLKMIN and then
characters which “look like” our 0 to 9, are the LSN position. Command ANDLW 15 CLKHRS.
held at its addresses 48 to 57, in other isolates that nibble, zeroing the MSN. First time round the loop, at ADDCLK
words, they are ASCII characters. Now ADDLW 48 converts the value to the the first byte to be incremented is, of
With the 7-segment displ

Everyday Practical Electronics - EPE PIC Tutorial Vol 2 Part III 来自淘豆网www.taodocs.com转载请标明出处.

非法内容举报中心
文档信息
  • 页数 16
  • 收藏数 0 收藏
  • 顶次数 0
  • 上传人 kuo08091
  • 文件大小 0 KB
  • 时间2014-06-03
最近更新