ATmega8515 III-Microprocessor-Assignment Codes, Exercises of Microprocessors

This is assignment solution in form of programming code. This code will be helpful to student of Microprocessor course. It was submitted to Prof. Purumitra Negi at Birla Institute of Technology and Science. It includes: Display, Feilds, Define, Unsigned, Typedef, Pattern, Frequency, Duty, Junk, endif

Typology: Exercises

2011/2012

Uploaded on 07/31/2012

parmila
parmila 🇮🇳

4.4

(9)

78 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
/* termproj.h */
#ifndef _TERM_PROJ_H
#define _TERM_PROJ_H
#define N_DSP_FLD 5 // number of display fields
typedef unsigned char U8;
typedef signed char S8;
typedef unsigned int U16;
typedef signed int S16;
typedef unsigned long U32;
typedef signed long S32;
typedef struct
{
struct
{
U8 str_stp:1;
U8 junk:5;
} bf;
struct
{
U8 line:1;
U8 pos:4;
U8 wide:3;
} df[N_DSP_FLD];
} LCD_STRUCT;
typedef struct
{
U8 str_stp:1;
U8 putPtr:3;
U8 getPtr:3;
} KB_STRUCT;
typedef struct
{
U8 str_stp:1;
U8 pattern:2;
} DL_STRUCT;
typedef struct
{
U8 str_stp:1;
U8 wpm:6;
} MC_STRUCT;
typedef struct
{
U8 str_stp:1;
U8 intensity:7;
} PWM_STRUCT;
typedef struct
docsity.com
pf2

Partial preview of the text

Download ATmega8515 III-Microprocessor-Assignment Codes and more Exercises Microprocessors in PDF only on Docsity!

/* termproj.h */ #ifndef _TERM_PROJ_H #define _TERM_PROJ_H #define N_DSP_FLD 5 // number of display fields typedef unsigned char U8; typedef signed char S8; typedef unsigned int U16; typedef signed int S16; typedef unsigned long U32; typedef signed long S32; typedef struct { struct { U8 str_stp:1; U8 junk:5; } bf; struct { U8 line:1; U8 pos:4; U8 wide:3; } df[N_DSP_FLD]; } LCD_STRUCT; typedef struct { U8 str_stp:1; U8 putPtr:3; U8 getPtr:3; } KB_STRUCT; typedef struct { U8 str_stp:1; U8 pattern:2; } DL_STRUCT; typedef struct { U8 str_stp:1; U8 wpm:6; } MC_STRUCT; typedef struct { U8 str_stp:1; U8 intensity:7; } PWM_STRUCT; typedef struct

docsity.com

U8 str_stp:1; U8 pattern:2; } PUL_STRUCT; typedef struct { struct { U8 str_stp:1; U8 junk:5; } bf; U8 frequency; U8 duty; } CLK_STRUCT; typedef struct _cmd // TBD { struct { U8 str_stp:1; U8 junk:5; } bf; U8 frequency; U8 duty; } CMD_STRUCT; #endif

docsity.com