Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Help with ASM/ENDASM command in PicBasicPro

Status
Not open for further replies.

karenhornby

New Member
I'm learning how to program Pic's for the first time and have got the fundamentals of PICBasic Pro ok so far
BUT
I want to include a sound ooutput on the 16F877 which I'm sure I have ok, and can get it to play simple sounds

However I've found Roman Black's BTc Sound Encoder 2.0 Software which converts sound (in wave files) to a 1-bit format that can be played back on microprocessor chip

The sound is output on 2 pins of the PIC as follows:

; Digital ----------2R-----,
; |
; Digital ----------2R-----*----- Analogue
; | out
; |
; |
; C = 0.22 uF
; |
; |
; |
; Gnd

The generated file is in ASM format, which I understand I can include by using the ASM command, but how do you define what ports the sound is to be played out of?
I've included the sound sample I wish to try here (its a clip from star trek) and IF its possible to use this somehow I'd like to have the sound generated on PORTD.0 and PORTD.1

Any ideas how to proceed with this?
 

Attachments

  • alert.asm
    56 KB · Views: 138
I can understand your confusion. I had a look at Roman Black's site and the code for the PIC is nowhere to be found. All you have above is a "wave table" and no playback algorithm.... Hmmmm...
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top