历史上的今天
今天是:2025年03月29日(星期六)
2020年03月29日 | pic10f200的一段玩具代码
2020-03-29 来源:eefocus
title "PIC10F202 counting program"
list p=10f202
#include __CONFIG _CP_OFF & _MCLRE_OFF & _WDT_OFF & _IntRC_OSC cpt1 equ 0x08 cpt2 equ 0x09 cpt3 equ 0x0A org 00h ;reset vector andlw 0xfe movwf OSCCAL clrf GPIO movlw 0x0b tris GPIO movlw 0xc0 option IncCount call Delay1s btfsc GPIO,2 goto next bsf GPIO,2 goto IncCount next bcf GPIO,2 goto IncCount ;loop ;------------------------------------------------ Delay1ms ;2us for CALL movlw 0xF9 movwf cpt1 ;2us etiq2 nop ;loop=4us*(0xF9=249)=996us decfsz cpt1,F goto etiq2 retlw 0x00 ;------------------------------------------------ Delay1s movlw 0x0A movwf cpt3 etiq4 movlw 0x64 movwf cpt2 etiq3 call Delay1ms decfsz cpt2,F goto etiq3 decfsz cpt3,F goto etiq4 retlw 0x00 end
史海拾趣
|
Design Studies on Hybrid Excitation Motor for Main Design Studies on Hybrid Excitation Motor for Main Spindle Drive in Machine Tools… 查看全部问答> |
|
#define DEFC(name, address) __no_init volatile unsigned char name @ address; 各位大虾 我在430的库文件里面看到这么一句 #define DEFC(name, address) __no_init volatile unsigned char name @ address; 是什么啊… 查看全部问答> |
|
HELPER2416开发板-TFTP开发环境的搭建及烧写系统-使用于ubunt 12.04 系统 本帖最后由 wsdymg 于 2014-7-20 16:20 编辑 自从上次捣鼓了SD卡烧录系统后,就继续按照手册进行下一步——TFTP方式烧录,本人使用的Ubuntu 12.04 系统,基本上是按照手册操作,遇到了一些问题,索性有万能的google,这里列出一些跟手册有出入的 ...… 查看全部问答> |




