Oscilator and timers usage!

Hi,

In my free times I’m develop small software applications, but when i needed to interface with some hardware was very difficult !! until a few months ago I’ve saw a Fez_panda 2 application and I’ve felt in love for microframework :D.
Because it was so easy to jump from my software applications in C# .Netframework to hardware applications with microframework :).

but after a while i’ve realise that in some apllications like reading encoders the code works better\faster if use low level code !

so my issues are :

if I create a new eg. “USBizi Application” wish timers are used by microframework by default ?
or if 'im writing in low level I can use any timer ?

also when i create this new "USBizi application " or a “EMX Application” the oscilator configurations are already configured ?

Sorry my english :smiley:

Bye

Hi Barros21, and welcome !

The framework does all this for you and you don’t need to do anything. Write C# code, deploy, and it’s done :slight_smile:

When you’re ready to get into low level stuff, you’ll be searching the forums and the wiki for “RLP” as that allows you to use the core processor in C and run “on the metal”. There’s some guidance like the Getting Started guide http://wiki.tinyclr.com/index.php?title=RLP_Getting_Started that might talk through some of these things - you can also see what others have posted on the codeshare site to get more info on the way to use RLP and things like timers (not something I’ve researched/used)

Hi Brett,

before I’ve know microframework I make some projects in C for microcontrollers PIC and AVR and every time I’ve crerate a new project i must configure some basics registers like oscilator type, power on reset etc etc.

and my question comes when I create a new project in visual studio, I have to chose my aplication like “fez panda aplication”, “usbizi aplication” ,“Emx aplication” etc
with those 3 aplications i know that configurations are already done, but when i use a “Mfconsoleapplication” ?
far as i know with a Mfconsoleapplication you can deploy to " fez panda", " EMX" , “G120” , “fez cerebros”, "fez domino " etc etc and those boards apllications comes with different clock speeds.
Maybe this basic configurations come with the boot loader on chip.

anyway, tank you for link of tinyclr :wink: .

Bye

You really don’t need to worry about those low level things until you talk RLP.

Create a new project. Because you have a Panda2, you should be creating a console project, never a graphics/WPF project (panda has not enough memory for that). Then you would add references for the Fez Panda 2 device. GHI simplified that by providing a template that allows you to create a Fez Panda 2 project in one step. That’s the only difference.

Here’s an AVR example that will highlight how netmf is more powerful.
You want to talk to a UART. You have a defined baud rate. You are using ATMEGA32 at 8mhz. You define your registers in your app to get that baud rate. You open the UART at your required baud rate and it works. Now you want to deploy it to an ATMEGA32 but it runs at 16mhz. You have to change the app. Or you want to run it on a ATMEGA128 at 16mhz. More changes.

You want to talk to a UART. You have a defined BAUD rate. You are using a Fez Mini. You open the UART at your required baud rate and it works. Now you want to deploy it to a Fez Panda; you replace the references to Fez Mini with Fez Panda, and deploy. Now you want to run it on a Fez Cobra; you replace the references and deploy. Now you want to run it on a Chipworkx device (much faster clock) and you replace the references and deploy. Same code, just works.