FRIENDz

FAILURE IS THE SIGN OF SUCCESS!!

Expand I/O Ports in ATmega16

The mikroC PRO for AVR provides a library for communication with the Microchip’s Port Expander MCP23S17 via SPI interface. Connections of the AVR compliant MCU and MCP23S17 is given on the schematic at the bottom of this page.
  Important :
  • The library uses the SPI module for communication. User must initialize the appropriate SPI module before using the Port Expander Library.
  • Library does not use Port Expander interrupts.

Transmitter and Receiver connect with ATmega16


The mikroC PRO for AVR provides a library for handling Manchester coded signals. The Manchester code is a code in which data and clock signals are combined to form a single self-synchronizing data stream; each encoded bit contains a transition at the midpoint of a bit period, the direction of transition determines whether the bit is 0 or 1;

  Important :
  • The Manchester receive routines are blocking calls (Man_Receive_Init and Man_Synchro). This means that MCU will wait until the task has been performed (e.g. byte is received, synchronization achieved, etc).
  • Manchester code library implements time-based activities, so interrupts need to be disabled when using it.

Connect Memory Card with ATmega128 Code


The Compact Flash Library provides routines for accessing data on Compact Flash card. CF cards are widely used memory elements, commonly used with digital cameras. Great capacity and excellent access time of only a few microseconds make them very attractive for microcontroller applications.
In CF card, data is divided into sectors. One sector usually comprises 512 bytes. Routines for file handling, the Cf_Fat routines, are not performed directly but successively through 512B buffer.

  Important :
  • Routines for file handling can be used only with FAT16 file system.
  • Library functions create and read files from the root directory only.
  • Library functions populate both FAT1 and FAT2 tables when writing to files, but the file data is being read from the FAT1 table only; i.e. there is no recovery if the FAT1 table gets corrupted.
  • If MMC/SD card has Master Boot Record (MBR), the library will work with the first available primary (logical) partition that has non-zero size. If MMC/SD card has Volume Boot Record (i.e. there is only one logical partition and no MBRs), the library works with entire card as a single partition. For more information on MBR, physical and logical drives, primary/secondary partitions and partition tables, please consult other resources, e.g. Wikipedia and similar.
  • Before writing operation, make sure not to overwrite boot or FAT sector as it could make your card on PC or digital camera unreadable. Drive mapping tools, such as Winhex, can be of great assistance.

CAN Protocol connect with ATMEGA16

The SPI module is available with a number of the AVR compliant MCUs. The mikroC PRO for AVR provides a library (driver) for working with mikroElektronika's CANSPI Add-on boards (with MCP2515 or MCP2510) via SPI interface.The CAN is a very robust protocol that has error detection and signalization, self–checking and fault confinement. Faulty CAN data and remote frames are re-transmitted automatically, similar to the Ethernet.

Data transfer rates depend on distance. For example, 1 Mbit/s can be achieved at network lengths below 40m while 250 Kbit/s can be achieved at network lengths below 250m. The greater distance the lower maximum bitrate that can be achieved. The lowest bitrate defined by the standard is 200Kbit/s. Cables used are shielded twisted pairs.
CAN supports two message formats:
  • Standard format, with 11 identifier bits and
  • Extended format, with 29 identifier bits

Connect Sensor with ATMEGA16 Code

ADC (Analog to Digital Converter) module is available with a number of AVR MCUs. Several library routines are included to provide you comfortable work with the module in single-ended mode.

Library Routines

  • ADC_Init
  • ADCx_Init_Advanced
  • ADC_Get_Sample
  • ADC_Read

ADC_Init

Prototype void ADC_Init();
// for XMEGA family of MCUs void ADCx_Init();

Connecting 4*4 Matrix KeyPad with ATMEGA16

The mikroC PRO for AVR provides a library for working with 4x4 keypad. The library routines can also be used with 4x1, 4x2, or 4x3 keypad.

External dependencies of Keypad Library
The following variable must be defined in all projects using Keypad Library: Description : Example :
extern sfr char keypadPort; Keypad Port. char keypadPort at PORTB;
extern sfr char keypadPort_Direction; Direction of the Keypad Port. char keypadPort_Direction at DDRB;

Library Routines

Android Software Free Download

Daily Ab Workout

Daily Ab Workout FREE

Description

Daily Ab Workout FREE is a great 5 to 10 minute daily ab routine for men and women that steps you through ten of the best ab-sculpting exercises. These proven exercises, demonstrated by a certified personal trainer, target all major abdominal muscles. Spending just minutes a day can strengthen your core and tone yourabs.The routine’s simple interface, complete with video and timer, allows you to easily follow along and understand each exercise.
*If you like Daily Ab Workout FREE, check out the full version which features:
• A second and third workout to vary up your routine
• Randomize feature for different daily workouts  Continue reading