free 8051 Microcontroller Projects AVR PIC Microcontroller Projects Tutorials Ebooks Libraries, interfacing tutorials, lcd tutorial, stepper motor, dc motor 8051 assembly language programming electronics and communication ECE CSE pdf ebooks library BE final year project ideas Embedded systems

 
8051 microcontroller 8051 microcontroller
Forums

Rickey's World :: Discussion Forums :: Project Development :: Project Help
 
<< Previous thread | Next thread >>
lock project---password display problem.
Go to page   <<      
Moderators: Ajay Bhargav, Arun Kumar V, pdi33, Shailesh NAYAK, ۞ TPS ۞, shyam, sashijoseph, ExperimenterUK, DavesGarage
This thread is now closed
Author Post
Coitsu
Tue Nov 24 2009, 06:46PM
 User Offline
Registered Member #22660
Joined: Fri Oct 02 2009, 10:17PM

Posts: 16
Thanked 0 times in 0 posts
I have another problem with the same project... I want to use a speaker using the free port(p3.4) and I already have my own code to make a sound but I dont know where to put it... I wanna use the frequecy out of the p3.4 to connect it through a resistance which is connected to the base of a transistor, the emitter is connected to ground and the colector is connected to the negative side of the speaker and the positive to 5V.

Plz, I really need help with this... I've tried to figure it out but with no successful results...

here's my code to make a sound using a speaker and a frequency as input... also i'm using a led the check if everything is ok..

org 00h
jmp INIC
t2ms:
mov R1, #230
LX: nop
nop
nop
nop
nop
nop
DJNZ R1, LX
MOV R2, #230
LB: NOP
NOP
NOP
NOP
NOP
NOP
DJNZ R2, LB
ret


t1.5ms:
mov R1, #230
L3: nop
nop
nop
nop
nop
nop
DJNZ R1, L3
MOV R2, #115
LZ: NOP
NOP
DJNZ R2, LZ
ret

t50ms: mov R2, #50
L8: mov R1, #230
L6: nop
nop
nop
nop
nop
nop
DJNZ R1, L6
DJNZ R2, L8
ret




LEDON2: setB p3.4
call t1.5ms

clr p3.4

call t1.5ms
ret

LEDON3: setB p3.4
call t2ms

clr p3.4

call t2ms
ret

INIC:
MOV R4, #166
LEDON:
CALL LEDON2
DJNZ R4, LEDON


MOV R5, #120
LAZO1: CALL LEDON3
DJNZ R5,LAZO1


SJMP INIC



;sjmp ledon
unseg:
MOV R3, #240
L7: call t2ms
djnz r3, L7
ret



Welcome to my electronic world
Back to top

Ajay Bhargav
Wed Nov 25 2009, 01:17AM
Rickey's World Admin

 User Offline

Registered Member #1
Joined: Fri Feb 24 2006, 04:56AM

Posts: 7567
Thanked 1331 times in 1255 posts
I have already replied to one of the thread you posted, please try not to post multiple threads. I am locking this thread. and continue with other thread you posted.

www.rickeyworld.info
If you feel satisfied with the user's forum reply please click on the thank button.

Obey forum rules!
Respect others!
Back to top

Go to page   <<       

Jump:     Back to top

Syndicate this thread: rss 0.92 Syndicate this thread: rss 2.0 Syndicate this thread: RDF
Powered by e107 Forum System

8051 Microcontroller Projects 8051 AVR tutorials PIC microcontroller, 8051 assembly language programming electronics and communication ECE CSE pdf ebooks library BE final year project ideas Embedded systems