Download - Special Design Report
![Page 1: Special Design Report](https://reader035.vdocuments.us/reader035/viewer/2022080917/56813244550346895d98b5b0/html5/thumbnails/1.jpg)
Special Design ReportSpecial Design Report
IMDL Summer 2002
Matthew Chernosky
July 11, 2002
![Page 2: Special Design Report](https://reader035.vdocuments.us/reader035/viewer/2022080917/56813244550346895d98b5b0/html5/thumbnails/2.jpg)
OverviewOverview
Additional hardware Pulse Width Modulation channels
Need for additonal PWM channelsDesignResults
![Page 3: Special Design Report](https://reader035.vdocuments.us/reader035/viewer/2022080917/56813244550346895d98b5b0/html5/thumbnails/3.jpg)
Need for additional channelsNeed for additional channels
Atmel ATMega163 – 3 PWM channels built-in
Motion – Requires 2 channels (left and right)
Golf ball pickup– Needs more than one channel
![Page 4: Special Design Report](https://reader035.vdocuments.us/reader035/viewer/2022080917/56813244550346895d98b5b0/html5/thumbnails/4.jpg)
DesignDesign
2 additional channels to be implemented
Channels used for locomotionAltera MAX7032 CPLDDevelopment in VHDL
![Page 5: Special Design Report](https://reader035.vdocuments.us/reader035/viewer/2022080917/56813244550346895d98b5b0/html5/thumbnails/5.jpg)
DesignDesign
3 Settings for each channel– Forward– Reverse– Stopped
A 2-bit wide input bus selects desired setting for each channel
4 output port pins of uP
![Page 6: Special Design Report](https://reader035.vdocuments.us/reader035/viewer/2022080917/56813244550346895d98b5b0/html5/thumbnails/6.jpg)
DesignDesign
AlteraMAX7032
AtmelMega163
1 MHzoscillator
MicrocontrollerCPLD
PWM A Out
PWM B Out
Chan A select
Chan B select
![Page 7: Special Design Report](https://reader035.vdocuments.us/reader035/viewer/2022080917/56813244550346895d98b5b0/html5/thumbnails/7.jpg)
DesignDesign
15-bitcounter
CPLD
PWM A
PWM B
FF
FFLogic
Chan A select
Chan B select
1 MHz clock
Reset
![Page 8: Special Design Report](https://reader035.vdocuments.us/reader035/viewer/2022080917/56813244550346895d98b5b0/html5/thumbnails/8.jpg)
VHDLVHDL
ENTITY motor_pwm_580 IS
PORT(
clk : in STD_LOGIC;
PWM_IN_A: in STD_LOGIC_VECTOR(1 downto 0);
PWM_IN_B: in STD_LOGIC_VECTOR(1 downto 0);
PWM_OUT_A: out STD_LOGIC;
PWM_OUT_B: out STD_LOGIC
);
END motor_pwm_580;
![Page 9: Special Design Report](https://reader035.vdocuments.us/reader035/viewer/2022080917/56813244550346895d98b5b0/html5/thumbnails/9.jpg)
VHDLVHDL
cnt: PROCESS (clk)BEGIN
IF (clk = '1' and clk'EVENT) THENif (count < COUNT_MAX) then
-- increment countercount <= count + 1;
else-- reset counter when COUNT_MAX reachedcount <= COUNT_RST;
end if;END IF;
END PROCESS;
![Page 10: Special Design Report](https://reader035.vdocuments.us/reader035/viewer/2022080917/56813244550346895d98b5b0/html5/thumbnails/10.jpg)
ResultsResults
Oscilliscope waveform tests
Works with servos
20 ms
1.75 ms