Jump to content

Recommended Posts

Posted

Hello, I built an AOUT LC (used resistor networks for the 10k resistors rather than a bunch of discretes). I'm really confused on what happens when I use the function AOUT_Pin16bitSet(). For example, my expectation is that if I call AOUT_Pin16bitSet(0,32767), I'd see +5v on all the data output pins of the two 74hc595 chips, but instead the lower 3 of the second chip are zero, and the 7th pin of the first chip is 0.

That seems like some kind of bit shift / carry problem, but I don't quite understand how that AOUT_Pin16bitSet() function works. I was using AOUT_Pin7bitSet successfully, but since that's only 7 bits, I think I'm losing one pin on each 74hc595, and I'd like to get the full 8 bits of output.

What I need is the ability to correct my pitch levels in software since the hardware I'm interfacing my AOUT LC to isn't perfectly linear in its response, but 7 bits is too coarse.

Any help someone could provide would be greatly appreciated.

--Joe R.

Posted

a) First of all:

32767 == 0x7FFF == 0111 1111 1111 1111b

That's 15 bits not 16. Try 65535 == 0xFFFF

Make sure the variable you use is unsigned 16bits.

b) Show some source :)

c) Can you confirm all of the outputs work properly using different set functions?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...