Roman Black Sound (btc)


Results 1 to 40 of 58

Threaded View

  1. #15
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default Roman Black Numbers

    Here are some number sound files and Darrel Taylor's example program that allow your PIC chip to talk out numbers to you. The RB sound files are pretty scratchy, so if you want a professional sounding product, this is not the way to do it. But it is understandable, and sure beats counting the flashes of an LED. It also uses a lot of storage space for the sound files. But the fact that you can store them on a chip, is pretty cool. Darrel's RB_Sound include file was used, as well as his testRBsound program . Check out post # 5 for his post in this thread.

    Here is the suggested filter (Roman Black) that may make it sound a little better.

    ; R = 25968 ohms
    ;
    ; Digital -----------R-----*----- Analogue
    ; | out
    ; |
    ; |
    ; C = 0.22 uF
    ; |
    ; |
    ; |
    ; Gnd
    ;

    Code:
    '*********************************************************************
    '*  Name    : TestRBsound.pbp  from Darrel Taylor                    *
    '*  Author  : Darrel Taylor, modified by Walter Dunckel for numbers  *
    '*  Date    : 5/24/2010                                              *
    '*  Version : 0.1                                                    *
    '*  Notes   : This version is limited to 18F's                       *
    '*          : with only 1 sound at a time                            *
    '*********************************************************************
    ;-- Target = 18F4550 --
    
    asm
       __CONFIG    _CONFIG1L, _PLLDIV_5_1L & _CPUDIV_OSC1_PLL2_1L & _USBDIV_2_1L
       __CONFIG    _CONFIG1H, _FOSC_HSPLL_HS_1H
       __CONFIG    _CONFIG2L, _PWRT_ON_2L & _BOR_OFF_2L & _VREGEN_ON_2L
       __CONFIG    _CONFIG2H, _WDT_ON_2H & _WDTPS_512_2H
       __CONFIG    _CONFIG3H, _PBADEN_OFF_3H
       __CONFIG    _CONFIG4L, _LVP_OFF_4L & _XINST_OFF_4L
    endasm
    
    DEFINE OSC 48
    btc_Pin1  VAR PORTC.1   'sound output pin
    btc_Pin2 var portC.3      'dummy pin to keep DT_RBSound.pbp happy
    LATE_LED var PORTD.0
    
    DEFINE  btc_DATA  db
    INCLUDE "DT_RBSound.pbp"
    
    @   ImportSound n0,    "zero.asm"
    @   ImportSound n1,    "one.asm"
    @   ImportSound n2,    "two.asm"
    @   ImportSound n3,    "three.asm"
    @   ImportSound n4,    "four.asm"
    @   ImportSound n5,    "five.asm"
    @   ImportSound n6,    "six.asm"
    @   ImportSound n7,    "seven.asm"
    @   ImportSound n8,    "eight.asm"
    @   ImportSound n9,    "nine.asm"
    @   ImportSound n10,    "ten.asm"
    @   ImportSound n11,    "eleven.asm"
    @   ImportSound n12,    "twelve.asm"
    @   ImportSound n13,    "thirteen.asm"
    @   ImportSound n14,    "fourteen.asm"
    @   ImportSound n15,    "fifteen.asm"
    @   ImportSound n16,    "sixteen.asm"
    @   ImportSound n17,    "seventeen.asm"
    @   ImportSound n18,    "eighteen.asm"
    @   ImportSound n19,    "nineteen.asm"
    @   ImportSound n20,    "twenty.asm"
    @   ImportSound n30,    "thirty.asm"
    @   ImportSound n40,    "forty.asm"
    @   ImportSound n50,    "fifty.asm"
    @   ImportSound n60,    "sixty.asm"
    @   ImportSound n70,    "seventy.asm"
    @   ImportSound n80,    "eighty.asm"
    @   ImportSound n90,    "ninety.asm"
    @   ImportSound n100,    "hundred.asm"
    @   ImportSound n1000,    "thousand.asm"
    
    Main: 'says 140,259
        @ PlaySound n1
        pause 100
        @ PlaySound n100
        pause 100
        @ PlaySound n40
        pause 100
        @ PlaySound n1000
        pause 100
        @ PlaySound n2
        pause 100
        @ PlaySound n100
        pause 100
        @ PlaySound n50
        pause 100
        @ PlaySound n9
        pause 3000
    goto main
    The attached audio sample audio-sound-mp3.zip using a 18f4550 in PIC-USB-STK hardware from Olimex. But you can also get similar sound out of a non amplified piezo speaker using a 5uf capacitor.
    Attached Files Attached Files
    Last edited by ScaleRobotics; - 27th May 2010 at 00:20.

Similar Threads

  1. Delayed output 10 secs
    By lilimike in forum mel PIC BASIC Pro
    Replies: 37
    Last Post: - 14th October 2011, 06:28
  2. new to PIC programming could really do with some help
    By karenhornby in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 5th March 2008, 14:03
  3. Help with sound command in 2 programs
    By hyperboarder in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 5th July 2007, 20:36
  4. Sound and sound control with minimal parts
    By bartman in forum General
    Replies: 23
    Last Post: - 18th January 2005, 14:08
  5. Re: quick fix for sound command?
    By Melanie in forum Code Examples
    Replies: 0
    Last Post: - 9th July 2004, 01:44

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts