Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
USBFm.asm
Package: USBFM.zip [view]
Upload User: wang202020
Upload Date: 2021-02-07
Package Size: 182k
Code Size: 4k
Category:
SCM
Development Platform:
HTML/CSS
- ; PICBASIC PRO(TM) Compiler 2.47, (c) 1998, 2006 microEngineering Labs, Inc. All Rights Reserved.
- _USED EQU 1
- INCLUDE "D:PBP18F2550.INC"
- ; Define statements.
- #define OSC 48
- #define LOADER_USED 1
- #define LCD_DREG PORTA
- #define LCD_DBIT 0
- #define LCD_RSREG PORTA
- #define LCD_RSBIT 4
- #define LCD_EREG PORTC
- #define LCD_EBIT 2
- #define LCD_BITS 4
- #define LCD_LINES 2
- #define LCD_COMMANDUS 2000
- #define LCD_DATAUS 50
- RAM_START EQU 00000h
- RAM_END EQU 003FFh
- RAM_BANKS EQU 00004h
- BANK0_START EQU 00060h
- BANK0_END EQU 000FFh
- BANK1_START EQU 00100h
- BANK1_END EQU 001FFh
- BANK2_START EQU 00200h
- BANK2_END EQU 002FFh
- BANK3_START EQU 00300h
- BANK3_END EQU 003FFh
- BANKA_START EQU 00000h
- BANKA_END EQU 0005Fh
- FLAGS EQU RAM_START + 000h
- R0 EQU RAM_START + 001h
- R1 EQU RAM_START + 003h
- R2 EQU RAM_START + 005h
- R3 EQU RAM_START + 007h
- R4 EQU RAM_START + 009h
- R5 EQU RAM_START + 00Bh
- R6 EQU RAM_START + 00Dh
- R7 EQU RAM_START + 00Fh
- R8 EQU RAM_START + 011h
- T1 EQU RAM_START + 013h
- GOP EQU RAM_START + 015h
- RM1 EQU RAM_START + 016h
- RM2 EQU RAM_START + 017h
- RR1 EQU RAM_START + 018h
- RR2 EQU RAM_START + 019h
- RS1 EQU RAM_START + 01Ah
- RS2 EQU RAM_START + 01Bh
- _Modulante EQU RAM_START + 01Ch
- _Frecuencia EQU RAM_START + 01Eh
- _Residuo EQU RAM_START + 01Fh
- _USBBufferCount EQU RAM_START + 020h
- _USBBuffer EQU RAM_START + 021h
- _PORTL EQU PORTB
- _PORTH EQU PORTC
- _TRISL EQU TRISB
- _TRISH EQU TRISC
- #define _incr _PORTC??0
- #define _decr _PORTC??1
- #define _PORTC??0 PORTC, 000h
- #define _PORTC??1 PORTC, 001h
- #define _TRISC??0 TRISC, 000h
- #define _TRISC??1 TRISC, 001h
- #define _TRISC??2 TRISC, 002h
- ; Constants.
- _USBBufferSizeMax EQU 00010h
- _USBBufferSizeTX EQU 00010h
- _USBBufferSizeRX EQU 00010h
- _FreqMin EQU 0000Ah
- ; EEPROM data.
- INCLUDE "USBFM.MAC"
- INCLUDE "D:PBPPBPUSB18.LIB"
- MOVE?CB 000h, TRISA
- MOVE?CB 000h, TRISB
- MOVE?CT 001h, _TRISC??0
- MOVE?CT 001h, _TRISC??1
- MOVE?CT 000h, _TRISC??2
- MOVE?CB _FreqMin, _Frecuencia
- MOVE?BB _Frecuencia, PORTB
- MOVE?CB 000h, PORTA
- MOVE?CB 000h, PORTC
- MOVE?CB 007h, ADCON1
- MOVE?CB 007h, CMCON
- USBINIT?
- LCDOUT?C 0FEh
- LCDOUT?C 001h
- LCDOUT?C 04Dh
- LCDOUT?C 06Fh
- LCDOUT?C 064h
- LCDOUT?C 075h
- LCDOUT?C 06Ch
- LCDOUT?C 061h
- LCDOUT?C 064h
- LCDOUT?C 06Fh
- LCDOUT?C 072h
- LCDOUT?C 020h
- LCDOUT?C 046h
- LCDOUT?C 06Dh
- LABEL?L _ProgramStart
- USBSERVICE?
- GOSUB?L _DoUSBOut
- GOSUB?L _DoUSBIn
- CMPNE?TCL _incr, 000h, L00001
- PAUSE?C 0C8h
- ADD?BCB _Frecuencia, 001h, _Frecuencia
- CMPLT?BCL _Frecuencia, 0FEh, L00003
- MOVE?CB 0FDh, _Frecuencia
- LABEL?L L00003
- MOVE?BB _Frecuencia, PORTB
- LABEL?L L00001
- CMPNE?TCL _decr, 000h, L00005
- PAUSE?C 0C8h
- SUB?BCB _Frecuencia, 001h, _Frecuencia
- CMPNE?BCL _Frecuencia, 009h, L00007
- MOVE?CB _FreqMin, _Frecuencia
- LABEL?L L00007
- MOVE?BB _Frecuencia, PORTB
- LABEL?L L00005
- DIV?BCW _Frecuencia, 021h, _Modulante
- MUL?WCW _Modulante, 021h, T1
- SUB?BWB _Frecuencia, T1, _Residuo
- MUL?BCB _Residuo, 00Ah, _Residuo
- DIV?BCB _Residuo, 021h, _Residuo
- USBSERVICE?
- LCDOUT?C 0FEh
- LCDOUT?C 0C0h
- LCDOUT?C 046h
- LCDOUT?C 03Dh
- LCDOUTD?W _Modulante
- LCDOUT?C 02Eh
- LCDOUTD?B _Residuo
- LCDOUT?C 020h
- LCDOUT?C 04Dh
- LCDOUT?C 068h
- LCDOUT?C 07Ah
- LCDOUT?C 020h
- LCDOUT?C 020h
- LCDOUT?C 020h
- LCDOUT?C 020h
- USBSERVICE?
- GOTO?L _ProgramStart
- LABEL?L _DoUSBIn
- MOVE?CB _USBBufferSizeRX, _USBBufferCount
- USBSERVICE?
- USBIN?CBBL 001h, _USBBuffer, _USBBufferCount, _FinDoUSBIn
- MOVE?BB _USBBuffer, _Frecuencia
- MOVE?BB _Frecuencia, PORTB
- LABEL?L _FinDoUSBIn
- RETURN?
- LABEL?L _DoUSBOut
- MOVE?BB _Frecuencia, _USBBuffer
- MOVE?CB _USBBufferSizeTX, _USBBufferCount
- USBSERVICE?
- USBOUT?CBBL 001h, _USBBuffer, _USBBufferCount, _FinDoUSBOut
- LABEL?L _FinDoUSBOut
- RETURN?
- END