Reply
Posts: 26
Registered: ‎01-24-2017
Accepted Solution

bgm121 idac demo

[ Edited ]

hi,

 

I would like to make some tests on the bgm121's idac but i don't really have time to go into coding.

Do you know where i could find an example? i can't find anything in the SDK Robot Sad

 

thanks by advance Robot Happy

Raphael

Posts: 2,826
Registered: ‎08-25-2015

Re: bgm121 idac demo

Hi,

 

Look into the MCU examples for that peripheral, they should be easily portable into the EFR32-based devices.

 

Regards,

Tiago

Posts: 26
Registered: ‎01-24-2017

Re: bgm121 idac demo

Thanks, just found it, i did some tests and it seems to work Robot Happy

 

i will now try to port it on the bgm121 Robot wink

Have a nice day

Raphael

Posts: 14
Registered: ‎01-31-2017

Re: bgm121 idac demo

Which MCU example specifically would have that peripheral?

Best,

 

Austin

Posts: 26
Registered: ‎01-24-2017

Re: bgm121 idac demo

I tried with the EFM32 Zero Gecko, I found an example in a sdk included in simplicity studio, with this example you could choose the range and the step with the board's buttons.

 

But you don't really need the board, just find the example's source code and just port it, it is really easy Robot wink

Posts: 26
Registered: ‎01-24-2017

Re: bgm121 idac demo

in fact, if I remember well, all you have to do is to check the IDAC0 box in the DefaultMode Peripherals (into the hwconf file) and then use this fonction

void idacSetup()
{
  /* Enable IDAC clock */
  CMU_ClockEnable(cmuClock_IDAC0, true);

  IDAC_Init_TypeDef idacInit =
  {
    .enable 		= true,
    .outMode 		= idacOutputAPORT1XCH4,
    .prsEnable 		= false,
    .prsSel 		= idacPRSSELCh0,
    .sinkEnable 	= false,
  };

  IDAC_Init(IDAC0, &idacInit);

  IDAC_RangeSet(IDAC0, idacRange);
  IDAC_StepSet(IDAC0, idacStep);

  /* Enable IDAC Current out */
  IDAC_OutEnable(IDAC0, true);
}

with idacRange between 0 and 3 (included) and idacStep between 0 and 31 included

idacOutputAPORT1XCH4 is th output port, here it is D12, check into the BGM121 datasheet if you want the idac on another PIN Robot wink

 

 

 

Posts: 14
Registered: ‎01-31-2017

Re: bgm121 idac demo

Thank you! I looked up the EFM32 Zero Gecko within simplicity and found a few examples, but I'm not sure which one exactly has that functionality. Do you recall the name of the example? Right now I'm looking at the Zero Gecko 3200 starter kit examples within SDK 5.1.3.

Posts: 26
Registered: ‎01-24-2017

Re: bgm121 idac demo

I just checked and it was called STK3200_idac_demo Robot wink

Posts: 40
Registered: ‎06-15-2016

Re: bgm121 idac demo

Hello, can you please give me the SDK version of your EFM32 Zero Gecko and the project example name? I couldn't find the STK3200_idac_demo on my project examples.

EFM32ZG_STK3200 examples.png

Thank you.

Highlighted
Posts: 2,326
Registered: ‎10-14-2014

Re: bgm121 idac demo

[ Edited ]

I think this is an application note, you could get it un an folder of simplicity sdudio.

Usually you could try below steps to import the application example into Simpliciy Studio:

1. in launcher perspetive

2. add new solution.

3. add the STK3200 to the solution.

4. select the STK3200 in the solution.

5. Document->AN0064. press and in the dialog choose AN0064 and press "import project".

6. then you can import the AN0064.

 

you could also download it here:
https://www.silabs.com/documents/public/example-code/an0064-efm32-idac.zip
https://www.silabs.com/documents/public/application-notes/AN0064.pdf

WeiguoLu