طراح

طراح

زندگی یعنی پژوهش و فهمیدن چیز جدید ( پروفسور حسابی)
طراح

طراح

زندگی یعنی پژوهش و فهمیدن چیز جدید ( پروفسور حسابی)

کتابخانه ماژول SIM900 - GSM

مدتی است که کتابخانه ای برای استفاده از ماژول های GSM نوشته ام و در پروژه های مرتبط با gsm  استفاده میکنم. جهت کمک به دوستان و توسعه و بهینه سازی بیشتر توسط سایر اساتید آن را منتشر میکنم.

کتابخانه را به برنامه تان اضافه کنید و :
ماژول را روشن و کانفیگ کنید
پیامک ها را دریافت و بخوانید
پیامک بفرستید
تماس ها را رد کنید
به تماس پاسخ دهید
پیامک فارسی ارسال کنید
شارژ سیم کارت را چک کنید
از وضعیت شبکه مطلع شوید
از وضعیت سیگنال مطلع شوید
اپراتور سیم کارت را تشخیص دهید
هیچ پیامکی را از دست ندهید(صف انتظار پیام)
حذف پیامک های خوانده شده به صورت هوشمند


دانلود راهنما


دانلود کتابخانه atXmega


دانلود کتابخانه aTmega


برای استفاده از کتابخانه در محیط اتمل استودیو از منوی file>advanced   save   option

قسمت Encoding را در حالت Arabic (Windows) - Codepage 1256 قرار دهید


در توسعه و بهینه سازی این کتابخانه شرکت کنید


حق نشرکتابخانه برای designer2013.blogsky.com محفوظ است. از کپی برداری بدون ذکر منبع خودداری کنید


ابوالفضل شاکری

کتابخانه i2c نرم افزاری برای اتمل استودیو

کتابخانه i2c نرم افزاری برای اتمل استودیو.

از هر پایه ای که بخواهید میتونید به عنوان scl و sda استفاده کنید.

دانلود

روش صحیح فعال کردن کامل sprintf

1- سربرگ solution explorer را انتخاب نمایید


2- روی libraies راست کلیک کنید و گزینه add library را انتخاب کنید


3- از پنجره باز شده تیک گزینه libprintf_flt را بزنید و سپس بر روی ok کلیک کنید.


و سپس:


آشنایی بیشتر با محیط اتمل استدیو

آشنایی با محیط ATMEL STUDIO


من تمام برنامه هایم را با اتمل استدیو مینویسم و واقعا برنامه نویسی با این نرم افزار برای من لذت بخش هستش، قوی ترین رابط کاربری برای برنامه نویسی میکروهای avr اتمل استدیو هست و می خواهم یکم بیشتر با محیط برنامه نویسی اتمل استدیو آشنا بشیم.

1-  اگر گزینه view white space را از آدرس edit>advanced>view white space را انتخاب کنید، تمام فاصله هایی که با tab یا space ایجاد شده اند نمایش داده میشوند.


2- اگر گزینه list methods in current file   از    VAssistX را انخاب کنید یا از شرت کات آن استفادده کنید (alt + m) امکان دسترسی سریع به توابع نوشته شده را خواهید داشت. که در برنامه هایی که توابع زیادی دارند، دسترسی به توابع بسیار سریع میشود.




3- اگر که میخواهید بدانید که یک عبارت را در چند جا و چه جاهایی استفاده کرده اید مکان نما را روی آن عبارت قرار دهید و shift+alt+f را فشار دهید یک پنجره پایین صفحه باز میشود که هر کجا از آن عبارت استفاده کرده باشید را برایتان مشخص میکند.


4- برای پرش به سورس یک عبارت مکان نما را روی آن عبارت قرار دهید و از alt+G استفاده کنید.

5- برای تغییر یک عبارت در تمام متن مکان نما را روی آن عبارت قرار دهید و از shift+alt+R استفاده کنید.


6- برای تمام صفحه شدن محیط برنامه نویسی از shift+alt+Enter استفاده کنید.


7- میتوانید مطابق شکل زیر شماره گذاری کنار خط ها را فعال کنید. (tools>options)


8- برای بستن تمام توابع (جمع کردن آنها) ابتدا ctrl+m و سپس ctrl+a را فشار دهید.


Command

Description

General Development, Web

Edit.Copy

Copies the selected item to the Clipboard.

CTRL+C or CTRL+INSERT

Edit.Cut

Deletes the selected item from the file and copies it to the Clipboard.

CTRL+X or SHIFT+DELETE

Edit.CycleClipboardRing

Pastes an item from the Clipboard ring to the cursor location in the file. To paste the next item in the Clipboard ring instead, press the shortcut again.

CTRL+SHIFT+V

Edit.Delete

Deletes one character to the right of the cursor.

DELETE

Edit.Find

Displays the Quick tab of the Find and Replace dialog box.

CTRL+F

Edit.FindAllReferences

Displays the list of references for the selected symbol.

SHIFT+ALT+F

Edit.FindinFiles

Displays the In Files tab of the Find and Replace dialog box.

CTRL+SHIFT+F

Edit.FindNext

Finds the next occurrence of the search text.

F3

Edit.FindNextSelected

Finds the next occurrence of the currently selected text, or the word at the cursor.

CTRL+F3

Edit.FindPrevious

Finds the previous occurrence of the search text.

SHIFT+F3

Edit.FindPreviousSelected

Finds the previous occurrence of the currently selected text, or the word at the cursor.

CTRL+SHIFT+F3

Edit.FindSymbol

Displays the Find Symbol pane of the Find and Replace dialog box.

ALT+F12

Edit.GoToFindCombo

Puts the cursor in the Find/Command box on the Standard toolbar.

CTRL+D

Edit.IncrementalSearch

Activates incremental search. If incremental search is on, but no input is passed, the previous search query is used. If search input has been found, the next invocation searches for the next occurrence of the input text.

CTRL+I

Edit.Paste

Inserts the Clipboard contents at the cursor.

CTRL+V or SHIFT+INSERT

Edit.QuickFindSymbol

Searches for the selected object or member and displays the matches in the Find Symbol Results window.

SHIFT+ALT+F12

Edit.NavigateTo

Displays the Navigate To dialog box.

CTRL+,

Edit.Redo

Repeats the most recent action.

CTRL+Y or SHIFT+ALT+BACKSPACE or CTRL+SHIFT+Z

Edit.Replace

Displays the replace options on the Quick tab of the Find and Replace dialog box.

CTRL+H

Edit.ReplaceinFiles

Displays the replace options on the In Files tab of the Find and Replace dialog box.

CTRL+SHIFT+H

Edit.SelectAll

Selects everything in the current document.

CTRL+A

Edit.StopSearch

Stops the current Find in Files operation.

ALT+F3, S

Edit.Undo

Reverses the last editing action.

CTRL+Z or ALT+BACKSPACE

View.ViewCode

For the selected item, opens the corresponding file and puts the cursor in the correct location.

CTRL+ALT+0

Command

Description

Shortcut

Edit.CharLeft

Moves the cursor one character to the left.

LEFT ARROW

Edit.CharRight

Moves the cursor one character to the right.

RIGHT ARROW

Edit.DocumentEnd

Moves the cursor to the last line of the document.

CTRL+END

Edit.DocumentStart

Moves the cursor to the first line of the document.

CTRL+HOME

Edit.GoTo

Displays the Go To Line dialog box.

CTRL+G

Edit.GoToDefinition

Navigates to the declaration for the selected symbol in code.

ALT+G

Edit.GoToNextLocation

Moves the cursor to the next item, such as a task in the Task List window or a search match in the Find Results window. Subsequent invocations move to the next item in the list.

F8

Edit.GoToPrevLocation

Moves the cursor back to the previous item.

SHIFT+F8

Edit.IncrementalSearch

Starts incremental search. If incremental search is started but you have not typed any characters, recalls the previous pattern. If text has been found, searches for the next occurrence.

CTRL+I

Edit.LineDown

Moves the cursor down one line.

DOWN ARROW

Edit.LineEnd

Moves the cursor to the end of the current line.

END

Edit.LineStart

Moves the cursor to the start of the line.

HOME

Edit.LineUp

Moves the cursor up one line.

UP ARROW

Edit.NextBookmark

Moves to the next bookmark in the document.

CTRL+K, CTRL+N

Edit.NextBookmarkInFolder

If the current bookmark is in a folder, moves to the next bookmark in that folder. Bookmarks outside the folder are skipped.

If the current bookmark is not in a folder, moves to the next bookmark at the same level.

If the Bookmark window contains folders, bookmarks in folders are skipped.

CTRL+SHIFT+K, CTRL+SHIFT+N

Edit.PageDown

Scrolls down one screen in the editor window.

PAGE DOWN

Edit.PageUp

Scrolls up one screen in the editor window.

PAGE UP

Edit.PreviousBookmark

Moves the cursor to the location of the previous bookmark.

CTRL+K, CTRL+P

Edit.PreviousBookmarkInFolder

If the current bookmark is in a folder, moves to the previous bookmark in that folder. Bookmarks outside the folder are skipped.

If the current bookmark is not in a folder, moves to the previous bookmark at the same level.

If the Bookmark window contains folders, bookmarks in folders are skipped.

CTRL+SHIFT+K, CTRL+SHIFT+P

Edit.ReverseIncrementalSearch

Changes the direction of incremental search to start at the bottom of the file and progress toward the top.

CTRL+SHIFT+I

Edit.ScrollLineDown

Scrolls text down one line. Available in text editors only.

CTRL+DOWN ARROW

Edit.ScrollLineUp

Scrolls text up one line. Available in text editors only.

CTRL+UP ARROW

Edit.ViewBottom

Moves to the last visible line of the active window.

CTRL+PAGE DOWN

Edit.ViewTop

Moves to the first visible line of the active window.

CTRL+PAGE UP

Edit.WordNext

Moves the cursor to the right one word.

CTRL+RIGHT ARROW

Edit.WordPrevious

Moves the cursor to the left one word.

CTRL+LEFT ARROW

View.NavigateBackward

Moves to the previously browsed line of code.

CTRL+-

View.NavigateForward

Moves to the next browsed line of code.

CTRL+SHIFT+-

View.NextError

Moves to the next error entry in the Error List window, which automatically scrolls to the affected section of text in the editor.

CTRL+SHIFT+F12

View.NextTask

Moves to the next task or comment in the Task List window.

 


Command

Description

Shortcut

VAssistX.FindReference

Find all references to the marked text.

SHIFT+ALT+F

VAssistX.FindSymbolDialog

Opens the symbols dialog listing all symbols in the project.

SHIFT+ALT+S

VAssistX.GotoImplementation

Go to implementation.

ALT+G

VAssistX.ListMethodsInCurrentFileOpens the list of all methods in the current file.ALT+M
VAssistX.OpenCorrespondingFileOpens the corresponding file (i.e. .h/.c).ALT+O
VAssistX.OpenFileInSolutionDialogDisplays a list of all files in the solution.SHIFT+ALT+O
VAssistX.PasteShows the paste history menu.CTRL+SHIFT+V
VAssistX.RefactorContextMenuShows the refactor context menu.SHIFT+ALT+Q
VAssistX.RefactorRenameShows the rename dialog.SHIFT+ALT+R
VAssistX.ScopeNextJump to next scope.ALT+Down Arrow
VAssitX.ScopePreviousJump to previous scope.ALT+Up Arrow


از برنامه نویسی با ATMEL STUDIO لذت ببرید

کتابخانه DS3231 برای ATXMEGA

راه اندازی آی سی ساعت DS3231 با استفاده از ATXMEGA
مشخصات DS3231:
Accuracy ±2ppm from 0°C to +40°C
Battery Backup Input for Continuous Timekeeping
Low-Power Consumption
Real-Time Clock Counts Seconds, Minutes, Hours, Day, Date, Month, and Year with Leap Year
Compensation Valid Up to 2100
Two Time-of-Day Alarms
Programmable Square-Wave Output
Fast (400kHz) I2C Interface
3.3V Operation
Digital Temp Sensor Output: ±3°C Accuracy


کتابخانه ال سی دی گرافیکی TS240128D

یک کتابخانه عالی برای راه اندازی GLCD 240X128  - مدل TS240128D

رسم دایره و مستطیل و خط و ...

فارسی نویسی 


کتابخانه را کمی تغییرات دادم تا در Atmel studio بتوان از آن استفاده کرد.


اول برنامه و قبل از اضافه کردن کتابخانه GLCD حتما تعریف و  کتابخانه استفاده از حافظه فلش را قرار دهید.


#define  __PROG_TYPES_COMPAT__ prog_char

#include <avr/pgmspace.h>


نکته دیگه این که برای نوشتن حرف   "ی"   از   "SHIFT + X"   استفاده کنید.


این کتابخانه توسط آقای نوربخش آماده شده است.





دانلود پروتئوس و برنامه



توابع کتابخانه ای استاندارد 2

کتابخانه string.h:

1- char *strcat(char *str1,char *str2):

رشته str2 را به انتهای str1  وصل میکند.

2- char *strcatf(char *str1,char  flash *str2):

رشته str2 را که در حافظه فلش قرار دارد به انتهای رشته str1 وصل میکند.

3- char *strncat(char *str1,char *str2, unsigned char n):

رشته str2 را به طول n کارکتر به انتهای رشته str1 وصل میکند.

4- char *strncatf(char *str1,char flash *str2, unsigned char n):

رشته str2 را که در حافظه فلش قرار دارد به طول n کارکتر به انتهای رشته str1 وصل میکند.

5- char *strchr(char *str,char c):

موقعیت اولین کارکتر برابر با c را که در رشته str قرار داشته باشد برمیگرداند.

6- char *strrchr(char *str,char c):

موقعیت آخرین کارکتر برابر با c را که در رشته str قرار داشته باشد برمیگرداند.

7- signed char strcmp(char *str1,char *str2):

دو رشته str1  با str2 را مقایسه میکند و اگر دو رشته با هم برابر باشند خروجی تابع صفر خواهد بود و  در غیر این صورت غیر صفر.

8- signed char strcmpf(char *str1,char flash *str2):

دورشته str1 را که در حافظه فلش قرار دارد را با رشته str2 مقایسه میکند، در صورتی که دو رشته با هم برابر باشند خروجی تابع صفر خواهد بود و در غیر این صورت غیر صفر.

9- signed char strncmp(char *str1,char *str2, unsigned char n):

دورشته str1  را با رشته str2 به تعداد کارکتر مقایسه میکند، در صورتی که دو رشته با هم برابر باشند خروجی تابع صفر خواهد بود و در غیر این صورت غیر صفر.

10- char *strcpy(char *dest,char *src):
رشته src را در رشته dest کپی میکند.
11- char *strcpyf(char *dest,char *src):
رشته src را که در حافظه فلش قرار دارد را در رشته dest کپی میکند.
12- char *strncpy(char *dest,char *src):
رشته src را به طول کارکتر در رشته dest کپی میکند.

ابوالفضل شاکری

توابه کتابخانه ای استاندارد

کتابخانه stdlib.h :

1- int atoi(char *STR):

تبدیل رشته str به عدد اینتجر


2- long int atol (char *STR):

تبدیل رشته str به عدد لانگ اینتجر


3- void itoa (int n,char *STR):

تبدیل عدد اینتجر(n) به رشته عددی


4- void ltoa (long int n,char *STR):

تبدیل عدد لانگ اینتجر (n) به رشته عددی


5- int rand (void)

تولید عدد رندم بین 0 تا 32767



کتابخانه math.h :

1- unsigned char cabs(signed char x):

برگرداندن قدر مطلق عدد از نوع بایت


2- unsigned int abs(int x):

برگرداندن قدر مطلق عدد از نوع اینتجر


3- float fabs(float x):

برگرداندن قدر مطلق عدد از نوع اعشاری



4- signed char cmax(signed char a, signed char b):

برگرداندن بزرگترین عدد بین a و b - عدد از نوع بایت


5- int max(int a,int b):

برگرداندن بزرگتزین عدد بین a و b - عدد از نوع اینتجر


6- long int lmax(long int a,long int b):

برگرداندن بزرگتزین عدد بین a و b - عدد از نوع لانگ اینتجر


7- float fmax(float a,float b):

برگرداندن بزرگتزین عدد بین a و b - عدد از نوع اعشاری


8- signed char cmin(signed char a,signed char b):

برگرداندن کوچکترین عدد بین a و b - عدد از نوع بایت


8- int min(int a,int b):

برگرداندن کوچکترین عدد بین a و b - عدد از نوع اینتجر


9- float fmin(float a,float b):

برگرداندن کوچکترین عدد بین a و b - عدد از نوع اعشاری


ابوالفضل شاکری

کتابخانه استفاده از 74HC166

کتابخانه استفاده از 74HC166


با استفاده از این کتابخانه و شیفت رجیستر 74HC166 می توانید با 4 پایه از میکرو وضعیت 8 پین ورودی را بخوانید



نسخه ATMEGA


نسخه ATXMEGA

ابوالفضل شاکری

کتابخانه راه اندازی ال سی دی کارکتری با سه پایه میکروکنترلر - (74hc164)

کتابخانه راه اندازی ال سی دی کارکتری با سه پایه میکروکنترلر - (74hc164)

سلام

با این کتابخانه میتونید فقط با سه تا از پایه های میکروکنترلر، ال سی دی کارکتری را راه اندازی کنید.


نسخه ATMEGA 


نسخه ATXMEGA



1- تابع  LCDinit: این تابع رو که همه میدونن چی هست.

2- تابع LCDclr: تابع پاک کردن LCD

3- LCDGotoXY: تابع تعیین موقعیت اشاره گر LCD

4- تابع(LCDstring(uint8_t*, uint8_t: تابع نمایش یک رشته روی LCD به طول آرگومان ورودی دوم LCD

EX: LCDstring("HELLO",5)
در این صورت تمام حروف رشته مورد نظر روی ال سی دی نشان داده میشوند

EX: LCDstring("HELLO",2)

در این صورت فقط دو حرف اول رشته مورد نظر نشان داده میشود

5- تابع(LCDshiftRight(n: تابع شیفت دادن تمام LCD به سمت راست به تعداد n کارکتر.


سایر توابع هم به همین راحتی میباشند.


فقط در فایل هدر پایه های ال سی دی رو مشخص کنید.



ابوالفضل شاکری