New Tutorial - Reading Analog Inputs

News about the Mojo!
Post Reply
embmicro
Site Admin
Posts: 834
Joined: March 24th, 2013, 12:45 pm

New Tutorial - Reading Analog Inputs

Post by embmicro » June 4th, 2013, 3:49 pm

I just wanted to announce that a new tutorial has been posted!
http://embeddedmicro.com/tutorials/mojo/analog-inputs/

In this tutorial we cover how to use the avr_interface module to read the analog inputs on the Mojo.

Enjoy!

russm
Posts: 18
Joined: May 5th, 2013, 2:32 am

Re: New Tutorial - Reading Analog Inputs

Post by russm » June 4th, 2013, 8:19 pm

In the tutorial, you mention
If you specify an invalid channel number the ADC will be disabled. This is useful when you don't need to use the ADC and would like to have lower latency and higher throughput on the serial port.
What's the behaviour of the AVR if the channel select lines are HiZ? Does this also disable the ADC, or do I need to I explicitly select an invalid channel?

embmicro
Site Admin
Posts: 834
Joined: March 24th, 2013, 12:45 pm

Re: New Tutorial - Reading Analog Inputs

Post by embmicro » June 4th, 2013, 8:34 pm

If they are high-z I think the FPGA has weak pull-ups enabled by default so the channel will actually be 15, which is invalid.

However, if you're not planning on using it, just feed 4'd15 into the channel input of the avr_interface module. You shouldn't just set the channel pins to 4'd15 because the AVR pins they connect to could still be outputs if you don't wait for the cclk to signal the AVR is ready.

Hojima
Posts: 10
Joined: June 3rd, 2013, 10:19 am

Re: New Tutorial - Reading Analog Inputs

Post by Hojima » June 14th, 2013, 9:39 am

Don't you think you should add some more topics to the boards? There should be a "help", and this should be in "announcements". BTW, I'm loving this FPGA board and the tutorials, thanks for the effort.

Edit: you should also include a "suggestions" topic.

embmicro
Site Admin
Posts: 834
Joined: March 24th, 2013, 12:45 pm

Re: New Tutorial - Reading Analog Inputs

Post by embmicro » June 14th, 2013, 1:13 pm

That sounds like a good suggestion to me! I added more topics.

Post Reply