Interfacing embeded systems with computer software using VB.NET

Advertisements

Using eclipse AVR application development plug in

In previous post you have seen how to install AVR plugin in eclipse IDE. In this post you are going to see how to use the plugin.  First of all you will need to create a new project. Go to menu bar and select “new” and from the submenu select “C Project”.

By expanding the folder “AVR cross target application “choose Empty Project” and “AVR-CGG toolchain” from the toolchain list .Type down the project’s name, and then hit next.

Here you can click on advance setting but that will be explained in a coming post, when we come to explain avr-dude. Anyway make sure that both list items are ticked and proceed to the next form.

Choose your microcontroller type and its clock frequency (this is similar to #define F_CPU 8000000UL) in WINAVR.

In the “Project Explorer” tab right click on your project and choose “New > Source File” from the pop up menu. Similar way you can add a header file or C class file. Type in the file name and you must type the file’s extension witch is “.c” in this case.

Write in your code ,note that if you press “ctrl” + ”space”  the IDE can suggest to you thing to write .Also there is some useful tab under the work space tab from these tabs you can see what are the supported register , ports and interrupts  for you MCU.

To compile your code you’ll need to save your work because eclipse will not save it for you. Then click on the small arrow near the hammer icon in the tools bar and choose “Debug” .The errors will be displayed in the problems tab and so the warnings . This will generate new folder in the project explorer bar called Debug. If you browse the folder you will notice that the hex file is not there yet, that’s because we haven’t built the project yet. To build the project tick on “Release”  from the same menu you clicked debug and new folder will be add to the project explorer called release and the contains the “.hex” file .

Eclipse IDE AVR application development plugin

While surfing for a great tutorial for embedded systems development in AVR-GCC website, I came across very interesting topic, so I said let’s give it a try. The post/article was about a plugin for eclipse IDE (integrated development environment) for developing AVR applications. The plug in is using avr-gcc to compile the projects so you still need to install WINAVR (I’m not sure). What is good about it is that, it can tell you about the error without compiling the code, nice code coloring, and it can suggest or predict syntax. Also you can easily configure your make file through a graphical user interface. Beside that you can directly burn your software to the chip as we will see in coming posts.

To install the plugin you’ll need to install a few things first. You’ll need eclipse IDE. Any one will work but if you are not Java developer you can download the C/C++ IDE directly. Also you will need to install CDT (C/C++ Development tool) plugin in your eclipse IDE.

figure1

By clicking on help menu and choose “Install new software”.

Then click on “Add” and put anything on the Name field. Now copy one of these links in the location field depending on your eclipse.

for Eclipse Indigo               

http://download.eclipse.org/tools/cdt/releases/indigo

for Eclipse Helios

http://download.eclipse.org/tools/cdt/releases/helios

for Eclipse Galileo

http://download.eclipse.org/tools/cdt/releases/galileo

You may find that the link already exits, and in that case you can choose it from the dropdown menu labeled with “work with”. You can also download the plugin from here and to offline installation. After restarting you eclipse you will need to repeat the same steps to install the AVR plug in but from this link http://avr-eclipse.sourceforge.net/updatesite . Or you can download it and install it offline from here.

After restarting your eclipse you can see the AVR menu has been add to the menu bar and small AVR icon add to the development toolbar .

next post will be about using the plugin .

المتحكم الدقيق (Microcontroller)

إذا كنتم من هواه الالكترونيات . و لديكم العزيمه للترقي إلى الدوائر الرقميه . هذه المقاله سوف تساعدكم في تطوير هذه المهارة . لن أتكلم في هذه المقالة عن أساسيات الدوائر الرقميه . ولكن عن المتحكمات الدقيقة التي تلعب دورا هاما في الدوائر الرقمية

المتحكم الذي سوف يستخدم في هذا المقالة و ربما في جميع المقالات لهذه المدونة هو آتميل آي في آر . و سوف تكون معظم الامثلة بستخدام ال آت ميجا 32 و ال آت ميجا 8

سوف نأخذ الآت ميجا 8 للتعرف على الخصائص المهمه للمتحكم .

تحتوي على 8 كيلو بايت ذاكرة و مضية FLASH

تحتوي على 512 بايت ذاكرة للقراءة قابلة للمسح EEPROM

تحتوي على 6 فنوات للتبديل التماثلي- الرقمي ADC

وسيط أتصال بأستخدام سلكين TWI او I2C

وسيط أجهزة طرفية تسلسلي SPI

منافذ تسلسلية قابلة للبرمجة USART

سرعة معالج تتدرج من 0 الى 16 مليون هرتز

مسامير أدخال و إخراج ذات أستخدام عام  GPIO

للمزيد من المعلومات الرجاء قراءة ورقة بيانات

تكوين المسامير للمتحكم آت ميجا 8

http://www.atmel.com/Images/2486s.pdf

تكوين المسامير للمتحكم آت ميجا 32

http://www.atmel.com/Images/2503s.pdf