0% found this document useful (0 votes)
26 views

Code For The Boost-Half-Bridge Converter Pulses

This document contains code for pulses that drive a half-bridge converter. It initializes registers and ports for the LCD data bus and high and low side drive signals. It then enters a main loop that calls a DRIVE_CONTROL subroutine to toggle the drive signals with an off time of 4 counts and an on time of 10 counts by clearing and setting the drive ports and decrementing a count register. Interrupt vectors are defined for the external interrupts and timers.

Uploaded by

sanish
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views

Code For The Boost-Half-Bridge Converter Pulses

This document contains code for pulses that drive a half-bridge converter. It initializes registers and ports for the LCD data bus and high and low side drive signals. It then enters a main loop that calls a DRIVE_CONTROL subroutine to toggle the drive signals with an off time of 4 counts and an on time of 10 counts by clearing and setting the drive ports and decrementing a count register. Interrupt vectors are defined for the external interrupts and timers.

Uploaded by

sanish
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

CODE FOR THE BOOST-HALF-BRIDGE CONVERTER PULSES

LCD_BUS

REG

P0

;LCD DATA BUS

H_DRIVE

REG

P1.0

L_DRIVE

REG

P1.1

COUNT

EQU 12H

;----------------------------------------------------------------ORG 000H
SJMP RESET

; POWER UP RESET VECTOR

ORG 003H
AJMP EXINT0

; EXTERNAL INTERRUPT 0 VECTOR

ORG 00BH
AJMP TIMER0

; COUNTER/ TIMER 0 INT VECTOR

ORG 013H
AJMP EXINT1
ORG 01BH

; EXTERNAL INT 1 VECTOR


;

AJMP TIMER1

; TIMER 1 INT VECTOR

ORG 023H
AJMP SERIAL

; SERIAL INT VECTOR

ORG 0050H
RESET:
MOV

SP,#5FH

CLR

H_DRIVE

;STACK POINTER VECTRED TO 5FH


;

SETB L_DRIVE
MAIN:
ACALL

DRIVE_CONTROL

SJMP MAIN

;-------------------DRIVE CONTROL-------------------DRIVE_CONTROL:
MOV COUNT,#4

;OFF TIME

NOP
NOP
LOOP_OFF:
CLR

H_DRIVE

NOP
SETB L_DRIVE
NOP
DJNZ COUNT,LOOP_OFF
MOV COUNT,#10

;ON TIME

LOOP_ON:
CLR

L_DRIVE

NOP
SETB H_DRIVE
NOP
DJNZ COUNT,LOOP_ON
RET
;--------------------------------------------------------------------------------------------TIMER0:
EXINT1:
EXINT0:
TIMER1:

SERIAL:
RETI

You might also like