Beginner using an EB013 board
Moderator: Benj
-
- Posts: 13
- Joined: Wed Jun 05, 2019 9:57 am
- Has thanked: 7 times
- Been thanked: 2 times
- Contact:
Beginner using an EB013 board
I have recently began trying to learn how to write to a DAC on the EB013 board from a BL0032 kit. Is it possible to produce an simple (say 1V) analogue signal using this component alone or does it have to be used with the DSP output component. If so could anybody provide instructions on this?
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Beginner using an EB013 board
Hello,
The DAC can generate an output voltage by itself, no DSP boards or components are required.
The DAC output voltage might have a very limited current and so if you need to drive anything requiring current then you may need some sort of buffer, maybe using an OpAmp? The EB013 may have an amplifier built onto the board, it's been a while since I looked at this.
The DAC can generate an output voltage by itself, no DSP boards or components are required.
The DAC output voltage might have a very limited current and so if you need to drive anything requiring current then you may need some sort of buffer, maybe using an OpAmp? The EB013 may have an amplifier built onto the board, it's been a while since I looked at this.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 13
- Joined: Wed Jun 05, 2019 9:57 am
- Has thanked: 7 times
- Been thanked: 2 times
- Contact:
Re: Beginner using an EB013 board
Hi Ben,
thanks for your reply. The only example I have been able to find in relation to using a DAC is the DSP audio solution program 1. This exercise uses more complicated components such as buffers. As I am a beginner I just want to be able to write to a DAC from the MCU in the BL0032 kit and produce an output voltage but I am unsure how to do this (which component macros to use and what ports to assign), I have gathered that using channel 2 on EB013 makes it simpler to use. Is there any help for this to allow me to figure out the basics?
thanks for your reply. The only example I have been able to find in relation to using a DAC is the DSP audio solution program 1. This exercise uses more complicated components such as buffers. As I am a beginner I just want to be able to write to a DAC from the MCU in the BL0032 kit and produce an output voltage but I am unsure how to do this (which component macros to use and what ports to assign), I have gathered that using channel 2 on EB013 makes it simpler to use. Is there any help for this to allow me to figure out the basics?
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Beginner using an EB013 board
Here's an example to drive the DAC using the SPI Master component from the Hardware - E-blocks 1 component category. It has specific macros to drive the various features of the EB013 E-block.
You'll need to configure the Pin connection properties to match your hardware.
Let us know how you get on.
You'll need to configure the Pin connection properties to match your hardware.
Let us know how you get on.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 13
- Joined: Wed Jun 05, 2019 9:57 am
- Has thanked: 7 times
- Been thanked: 2 times
- Contact:
Re: Beginner using an EB013 board
That attachment was very helpful and made many of my questions clear. I added an LED screen to allow me to see the voltage, to ensure the program was working which can be seen in the attached file. It wasn't displaying the voltage however. I'm not sure is that a problem with the LED screen or is due to the connections from EB013 to the MCU. I connected it to channel 2 and the 'DAC EN' and 'NVM EN' are connected to port C. Is there an issue with those connections?
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Beginner using an EB013 board
Hello,
Try this one, the readback of the DAC voltage wasn't done correctly and I'm not sure this is possible so I just use the RAM value instead.
Try this one, the readback of the DAC voltage wasn't done correctly and I'm not sure this is possible so I just use the RAM value instead.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 13
- Joined: Wed Jun 05, 2019 9:57 am
- Has thanked: 7 times
- Been thanked: 2 times
- Contact:
-
- Posts: 13
- Joined: Wed Jun 05, 2019 9:57 am
- Has thanked: 7 times
- Been thanked: 2 times
- Contact:
Re: Beginner using an EB013 board
The program worked with the simulator and performed the desired function. When attempting to compile the program to the hardware (BL0011& EB013) I am experiencing problems.
- Attachments
-
- Working_DAC.fcfx
- (19.72 KiB) Downloaded 168 times
-
- Error list.jpg (110.54 KiB) Viewed 4497 times
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Beginner using an EB013 board
Thanks for letting us know.
I have now fixed the problem and uploaded the fix to the Flowcode 8 update system. Use the Help -> Check for updates menu to get the updated SPI_Legacy component.
I have now fixed the problem and uploaded the fix to the Flowcode 8 update system. Use the Help -> Check for updates menu to get the updated SPI_Legacy component.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 13
- Joined: Wed Jun 05, 2019 9:57 am
- Has thanked: 7 times
- Been thanked: 2 times
- Contact:
Re: Beginner using an EB013 board
When I run my program and measure the voltage across the output of the DAC it is coming up as 0V. I think this may be due to the pins that the SPI is assigned to in properties. I have been following the schematic and trying to connect it to appropriate pins on port C. Can you see an issue with how it's connected?
- Attachments
-
- Working_DAC.fcfx
- (20.1 KiB) Downloaded 163 times