You can use PRUs to read GPIOs and write in data memory of PRU if there is 
any change, link that memory location to a pointer in the C code that is 
running in main processor and you can directly read that memory whenever 
you want based on you frequency of changes. PRU coding can be done in 
assembly level as well as in C, there is C compiler for PRUs. 

On Sunday, 5 April 2015 14:15:38 UTC+5:30, Snyp3rBunny wrote:
>
> Hi everyone, 
> I'm working on a school project and am in way over my head. I need to 
> control a lego NXT robotic arm using C code running on the BBB. I have the 
> electronics part all sorted out - my groupmate is a wiz with that. The 
> software is giving me trouble though - I'm used to using an old HCS12 board 
> in the school labs, and the BBB is quite different...
>
> I can export and read from the GPIO pins using the method shown here: 
> https://learnbuildshare.wordpress.com/2013/05/29/beaglebone-black-digital-ouput/
>  
> . The file opening and closing for every read/write seems really clunky 
> though when I'm trying to read quadrature encoder values... Would it 
> actually work? Or do I need a better method? I think I read somewhere that 
> the ports are memory-mapped and can be accessed that way - is that a 
> different method? Can someone explain how I would do that in C?
>
> Also, I need to set the pin mux setting in C as part of this program - can 
> anyone point me in the right direction to do that? :)
>
>
> Thanks for reading and for any help you can give :) I'm at the end of my 
> rope with trying to figure this out with google... :/
>
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to