Image Map Image Map
Page 3 of 6 FirstFirst 123456 LastLast
Results 21 to 30 of 54

Thread: Adding NOPs

  1. #21

    Default

    If you're using a 1 MHz crystal, I get 58 cycles or a frequency of 17KHz+. My hearing hasn't been that good for at least 20 years. Even 10KHz will sound like a high pitched tone. You might want to do at least 3 times as many nops to be in the normal listening range. Even there is will still sound high.
    In the audio range and being a reasonable tone are two different things. If you want to shoot for a lower frequency you might add some loops to the code counting down some value.
    Dwight

  2. #22

    Default

    If you're using a 1 MHz crystal, I get 58 cycles or a frequency of 17KHz+. My hearing hasn't been that good for at least 20 years. Even 10KHz will sound like a high pitched tone. You might want to do at least 3 times as many nops to be in the normal listening range. Even there is will still sound high.
    In the audio range and being a reasonable tone are two different things. If you want to shoot for a lower frequency you might add some loops to the code counting down some value.
    Dwight

  3. #23
    Join Date
    Jan 2011
    Location
    Vancouver, BC
    Posts
    4,856
    Blog Entries
    3

    Default

    Thanks guys! Ok I will try adding a ton more NOPS. Those switches are murder on the fingers. I was trusting the manual. I didn't pick up even the tiniest change in sound or pitch.. was dead silent, except ifmy finger touched the wire. I'm still kinda wondering about this stereo.. I think it may have some kind of anti white noise feature.

    Do you figure I want to have the signal wire to stereo on the Output Page 1 pin?

    I'll probe the machine a bit to dial in the cycle.

  4. #24

    Default

    Not a single wire from the sound source. It was just to check that the stereo is working. If you touch the single wire of the center of the RCA connector with your finger it will make a loud low frequency buzzing sound. If you fail to connect both leads of your processor it will make the same loud buzzing sound, even with the uP turned off. In that case it may even be possible to damage the stereo. You want ground to the shield of the amplifier. If you have a small piezo disk, you should be able to hear anything in the 1 to 2 KHz area someplace.
    Anyway the purpose of the example is so that you'll count the cycles and figure the frequency desired. It is suppose to be a learning example. Counting cycles can be important when using a uP for real time applications.
    Dwight

  5. #25
    Join Date
    Jun 2012
    Location
    UK - Worcester
    Posts
    3,570

    Default

    On the OSI 300 board you have OUTPUT PAGE 1 and OUTPUT PAGE 2. These appeear to be marked on the schematic as P2 and P3 (just to cause confusion).

    With the power off - and using your multimeter to measure resistance - you should find that one of the pads is wired to the SN7402 pin 10 and the other is wired to pin 13.

    Wire ONE of these two pads to the signal input of the aux input of the amplifier and wire the GND/screen of the aux input to the GND/0V of the OSI 300. That's all. The two outputs are in anti-phase with each other - two sides of a flip-flop - so they are not stereo at all.

    The output signal level from the SN7402 will be 5V TTL level - so it may be a bit 'hot' for directly inputting to the AUX input of an amplifier. In this case, you may require a simple external potentiometer to reduce the signal level a bit more before feeding it to an amplifier.

    The other thought - is to use an oscilloscope and see if you have anything at all on the output . Why try and hear something when you can see it to start with?!

    Dave

  6. #26
    Join Date
    Jan 2011
    Location
    Vancouver, BC
    Posts
    4,856
    Blog Entries
    3

    Default

    Thanks guys. I will try to scope this. I'm still trying to understand what they're telling me:

    "This loop takes 14 machine cycles to execute. The model 300 has a machine cycle time of two to four microseconds so the output period will be 28 to 56usec or 20 to 40khz. By measuring the output period with a scope or frequency meter and dividing by 14, the exact cycle time can be found"

    So if I'm getting 29khz then I divide by 14 and my cycle time is 2.0714? Anyway, 29 is what the scope seems to be coming up with off the output pins, unless I'm doing something wrong.

  7. #27

    Default

    Read what they say carefully. 29KHz is not the period, it is the frequency. You need to invert, 1 divided by 29000 = 34.5E-6, for period, or the loop takes 34.5 micro seconds.
    If you divide that by 14 you get 2.46 uSec for the cycle time.
    You've added 22 NOPs at 2 cycles each or 44 cycles plus the original 14 is 58 cycles of 2.56 uSec each or a total of 148,5 usec to be 6.730 KHz. That should be a high frequency squeal. Your amplifier should do that fine. Remember the highest frequency of a 88 key piano is only 4.186KHz.
    Dwight

  8. #28
    Join Date
    Jan 2011
    Location
    Vancouver, BC
    Posts
    4,856
    Blog Entries
    3

    Default

    Heh. Did I mention I got a grant pass in math? I literally go almost dyslexic with this stuff. Thank you for clarifying.

    Okay. Hmm... I think what I'll try then is using a period correct stereo. I can't see anything not working on the 300 here... I'm thinking this stereo's whitenoise circuitry might be shutting out any squealing. Just a guess at this point.

  9. #29

    Default

    I can't imagine any amplifier without a DSP eliminating a tone. Noise reduction is just that, reduction, not elimination.
    Did you try the finger test on your amplifier?
    Dwight

  10. #30
    Join Date
    Jun 2012
    Location
    UK - Worcester
    Posts
    3,570

    Default

    Agreed.

    >>> I can't see anything not working on the 300 here...

    Can you see anything with a scope or not?

    Dave

Bookmarks

Posting Permissions

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