Total members 11893 |It is currently Fri Nov 15, 2024 1:04 pm Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





The Digital to Analogue Converter
Code:

TITLE 
"Write DAC"
liat p 16f877
include <pl6f877.inc>
DELAY_LO EQU H'30'
COUNT EQU H'32'
ORG H'00'
NOP
GOTO START
;THE ROUTINES START HERE 
ORG 0x20
START BCF STATUS
,RP0 ;BANK 0
CLRF PORTD 
;-INITIALIZE PORTC By CLEARING OUTPJT DATA
LATCHES
BSF STATUS
,RP0 ;SELECT BANK1
MOVLW 0X00 
;W REG =00
MOVWF TRISD 
;SET RD AS oUTPUTS
BCF STATUS
,RP0 ;BANK 0
CLRF COUNT 
;COUNT 0

MAIN MOVF COUNT
,;GET COUNT
MOVWF PORTD 
;OUTPUT W REG TO PORTB
CALL DELAY
CALL DELAY
INCF COUNT 
;COUNT COUNT 1
GOTO MAIN
;SUBROUTINES

DELAY
  MOVLW 0X01
SET DELAY TIME
  MOVWF DELAY_LO
  
WAIT 
   INCFSZ DELAY_LO
,1COUNT DOWN
    GOTO WAIT 
    
RETURN 
    
END




_________________
M. S. Rakha, Ph.D.
Queen's University
Canada


Author:
Mastermind
User avatar Posts: 2715
Have thanks: 74 time
Post new topic Reply to topic  [ 1 post ] 

  Related Posts  to : The Digital to Analogue converter DAC writer
 ramp Counter ANALOGUE TO DIGITAL CONVERSION (ADC)     -  
 SUCCESSIVE APPROXIMATION ANALOGUE TO DIGITAL CONVERSION     -  
 digital watermark on image     -  
 C to C++ converter     -  
 PST Converter Pro     -  
 PHP srt to xml subtitle converter     -  
 need help doing Universal Converter     -  
 Number system converter (C++)     -  
 infix to postfix converter     -  



cron





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com