Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The ALC must be able to provide the winder with the number of turns needed for a

ID: 3692302 • Letter: T

Question

The ALC must be able to provide the winder with the number of turns needed for armature winding. The winder accepts a 6 bit number on its parallel inputs labelled D0 to D5. The number of windings to be wound onto the core is equal to the numeric values on the input times 100. That is – an input value of 15 specifies the number of turns to wind is 1500. A single active low pulse of 0.2s in duration applied to its START input is required to start the winding machine. The winder operates at an approximate speed of 50 turns per second, however as more wire is wound onto a core each wind takes longer. Hence time cannot be used to determine when the winder is finished. A single bit output labelled BUSY is output from the winder, indicating the status of the winding task. (0 while busy, 1 when finished).

Write a C subroutine called wind that accepts a parameter called n (the full number of windings required – Eg. 1500), provides the appropriate scaled value to the winders 6 bit input, starts the winder with the required pulse and waits for the winder to finish.

Explanation / Answer

void main()

{

int n;

printf("Enter the number of windings required");

scanf(%d,n);

wind(n);

}

windr(int n)

{

int now, not;

now = n*100;

not = 50/((n*100)*(0.2));

printf("Scaled value"%d",not);

}