Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
14 years ago

NIOSII Altera Monitor C code help!!!

typedef volatile struct

{

uint32_t period;

uint32_t pulse_width;

} PWM;

voidmain(void){ pwm * const pled = ...

pled->period = 5; pled->pulse_width = 4;

asm("nop"); asm("nop"); asm("nop"); pled->pulse_width = 2;}

For the code above.

I would like to know what modules I need to create for the computer. For example if i need, a PIO module in SOPC called pLED or period or pulse_width or all of them.

Thanks.
No RepliesBe the first to reply