Thank you.The microcontroller can do anything you want. You send a byte over the uart, the microcontroller reads it and lets your program read that byte. No need to worry about start and stop bits, almost all micros have this solved on hardware level. Then you assemble the whole 12bit number and send it over the spi.
It will be better to send the first 7 bits in the first byte like 1xxx xxxx and then the rest 5 bits in the second byte like 000x xxxx, so that you can be sure which byte is the first byte.
Any kind of budget?Thank you.
Could you recommend a microcontroller for me which can not only do this work but also useful for a beginner like me to practice later on with a reasonable price please.
Right, I see what you mean. It's like giving identification to each byte so they won't be confused. But I think the whole system only requires the DAC to be set once in every 5-10 mins, it won't be used frequently. It the identification method still necessary?No. The UART implements a specific serial protocol.
Your MCU will pick up two separate 8 bits.
What you do with the 8 bits is entirely up to you.
I suggest you send one 8-bit byte with the most significant bit (MSB) set to zero.
Next send the second 8-bit byte with the MSB set to one.
When the pair of bytes are received, check for proper synchronization.
Then strip off 6 bits off each byte and recombine to give you 12 bits.
Then send 12 bits via SPI to your DAC.
Edit: kubeek beat me to the punch. His scheme is ok too.
within £20 I guessAny kind of budget?
Doesn't matter, Murphy's Laws will prevail. If something can go wrong it will go wrong.Right, I see what you mean. It's like giving identification to each byte so they won't be confused. But I think the whole system only requires the DAC to be set once in every 5-10 mins, it won't be used frequently. It the identification method still necessary?
It's better to have such identification method anyway.
Sorry I don't really understand your question.Doesn't matter, Murphy's Laws will prevail. If something can go wrong it will go wrong.
What are the consequences of your DAC outputting full scale instead of a low voltage?
the Voltage Controlled Amplifier amplify signals from pre-amplifier, and the output is send to ADC then to PC.What is the Voltage Controlled Amplifier driving?
What happens if the amplifier suddenly jumps to zero gain or full gain?
Yes, its a group project. One of my group member who's in charge of microcontroller and software is away for 5 days. I thought I can have a go. But we are not giving any programmer unit, we have to choose by our-self.Is this some kind of school project? Then working with MCUs, you need a programmer unit and of course a MCU also. If this is a school project. Your school may have a programmer you can use.
| Thread starter | Similar threads | Forum | Replies | Date |
|---|---|---|---|---|
|
|
LCD ASCII Art Display | General Electronics Chat | 9 | |
| R | Number (decimal) in ascii -> binary | Homework Help | 50 | |
|
|
Understanding ASCII in Embedded development | Programming & Languages | 25 | |
| M | Hex to ASCII for display | Programming & Languages | 10 | |
|
|
How to generate ASCII code through digital circuits, with normal numbers? | Digital Design | 2 |