Darrels interrupts and multiple SOUND statements, will it work?


Closed Thread
Results 1 to 32 of 32

Hybrid View

  1. #1
    Join Date
    Feb 2013
    Posts
    1,153


    Did you find this post helpful? Yes | No

    Default Re: Darrels interrupts and multiple SOUND statements, will it work?

    Yes I already use 16F876's PWM channels to have 2 note polyphony, but I'd like to have more on simpler chips (say 12F683).

    Here's 16F628A doing not only stereo polyphony, but color graphics too:

    http://www.quinapalus.com/picsi.html

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,621


    Did you find this post helpful? Yes | No

    Default Re: Darrels interrupts and multiple SOUND statements, will it work?

    Out of curiosity, how many channels do you need?
    8 channels for 4 * 2 note polyphony? Highest/lowest output frequency?
    What frequency resolution would be considered good enough?

  3. #3
    Join Date
    Feb 2013
    Posts
    1,153


    Did you find this post helpful? Yes | No

    Default Re: Darrels interrupts and multiple SOUND statements, will it work?

    Actually, capabilities of AY-3-8910 will be enough (3 channels). Since I want to incorporate famous NES game tunes into my project as easter egg. If it was dedicated project, I can use that chip, which I have used on ZX Spectrum quite long time ago, but I'm space and hardware resources limited, so this is why I'm asking for software solution.

  4. #4
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,621


    Did you find this post helpful? Yes | No

    Default Re: Darrels interrupts and multiple SOUND statements, will it work?

    Hi,
    I fooled around with this a bit yesterday. I've got a software solution for generating three tones but there is (and won't be) any noise, mixer, envelope, shape and whatever else the AY-3-8910 can do - just three tone generators. I have no idea if it'll work in practice or how good it'll "sound" but scope and frequency counter shows correct values for, at this point, three octaves.

    With 3 channels it will NOT work at 4MHz, it MIGHT just work at 8MHz but there won't be much left do anything else. I'm currently running it on a 18F25K20 @64MHz so I need to breadboard something with a less capable chip and see what gives. Obviously the lower the maximum output frequency needs to be the more can be achieved with a low clock frequency so I'll ask again: What's the maximum output frequency you NEED?

    Is the 12F683 the desried target chip and will you able to run it with external clock (to get 16MHz or 20MHz)? As it's written it relies on the prescense of a TMR2 module and uses interrupts at the ASM level, though the actual ISR is written in PBP with manual system register save/restore.

    Are you aiming to do other things as well with this same chip?

    It's not ready for public viewing yet, I'll post it when it is (or not if the answers to the above questions shows it's a dead end....)

    /Henrik.

  5. #5
    Join Date
    Feb 2013
    Posts
    1,153


    Did you find this post helpful? Yes | No

    Default Re: Darrels interrupts and multiple SOUND statements, will it work?

    Here is the sample (intro music)



    You can see, it uses only 3 channels, no SFX or sophisticated envelope/shaping.

    For the hardware, main MCU is 16F877A @ 20mhz. I want code to run on it, or if it'll be better to have separate chip, I have space for SOIC-8 case, this is why I said 12F683, but it can be say 12F1840 or whatsoever (no space for extra xtal, but I can use CLKOOUT from main chip).

  6. #6
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,621


    Did you find this post helpful? Yes | No

    Default Re: Darrels interrupts and multiple SOUND statements, will it work?

    Hi,

    > You can see, it uses only 3 channels, no SFX or sophisticated envelope/shaping
    No, *I* can definitely not see (or hear) it. I know nothing about composing music of any kind so I'll take your word for it ;-)

    Are you using interrupt on the main CPU already and if so is it DT-INTS?

    The code should run on a 16F877 at 20MHz but it'll absorb a fair bit of the available CPU cycles meaning everthing else will run slow(ish). I'll get some data on it when I get a chance to work on it again. The 12F1840 has an internal 32MHz oscillator - that should work pretty well.

    /Henrik.

  7. #7
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,170


    Did you find this post helpful? Yes | No

    Default Re: Darrels interrupts and multiple SOUND statements, will it work?

    16F877 made that video game??

    Ioannis

Similar Threads

  1. Multiple IF THEN Statements: PIC16F84A
    By bob425 in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 10th August 2012, 07:01
  2. Problem with multiple interrupts
    By aratti in forum General
    Replies: 7
    Last Post: - 2nd June 2009, 09:18
  3. Multiple IF-THEN statements
    By DavidK in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 20th June 2007, 19:28
  4. Handeling multiple Interrupts
    By BobSpencerr in forum General
    Replies: 15
    Last Post: - 1st March 2007, 02:12
  5. Multiple HW Interrupts
    By Radiance in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 13th August 2003, 23:35

Members who have read this thread : 0

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