This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Bit-banging a DAC

Hi.

I'm currently trying to interface with a serial DAC. I have 16 bist of data, and I want to send these MSB first to the DAC. My question is:

How do I access the MSB of 2 bytes of data, and then shift the whole "row" of bits to the left so I can access the next MSB? Rotating or shifting in itself isn't a problem, but I need to shift the MSB of the second byte to the LSB position of the first byte aswell.

Does anyone have a solution to this? Or maybe I'm just going about it in the wrong way. Are there any easier way of sending this data to my DAC (Considering I do not have an SPI or microwire interface as an on-chip peripheral)...

Thanks for any help.

Oyvind

Parents
  • Ahh... I see it now. I was treating it as two separate bytes, while I of course have to just add it up to a word... I'll give that a try right away.

    Thank you VERY much for your help. I just love these message boards. Always someone there that can help you out with these silly (little) problems.

    Thanks again!

    Oyvind

Reply
  • Ahh... I see it now. I was treating it as two separate bytes, while I of course have to just add it up to a word... I'll give that a try right away.

    Thank you VERY much for your help. I just love these message boards. Always someone there that can help you out with these silly (little) problems.

    Thanks again!

    Oyvind

Children
No data