Skip to content

Commit f5ae08d

Browse files
committed
Divider Example
1 parent 6056354 commit f5ae08d

9 files changed

Lines changed: 1331 additions & 1 deletion

File tree

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,5 @@ libraries/Computing_Shield/circuit/DUO_LX9/par_usage_statistics.html
9696
libraries/ZPUino_1.zip
9797
libraries/audio libraries -2.0-v1.zip
9898
libraries/AVR_Wishbone_Bridge.zip
99-
libraries/AVR_Wishbone_Bridge.zip
99+
libraries/AVR_Wishbone_Bridge.zip
100+
*.zip
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
Gadget Factory
3+
LogicStart Shield Divider Example
4+
To learn more about using DesignLab please visit http://learn.gadgetfactory.net
5+
6+
This is a quick example of generating a 1Hz clock from the AVR chip and then dividing it and outputting the clock on the LEDs
7+
of the LogicStart Shield.
8+
9+
created 2014
10+
by Jack Gassett
11+
http://www.gadgetfactory.net
12+
13+
This example code is in the public domain.
14+
*/
15+
int led = 13;
16+
17+
void setup() {
18+
// put your setup code here, to run once:
19+
20+
pinMode(led, OUTPUT);
21+
22+
}
23+
24+
void loop() {
25+
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
26+
delay(500); // wait for a second
27+
digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
28+
delay(500); // wait for a second
29+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
-w
2+
-g DebugBitstream:No
3+
-g Binary:no
4+
-g CRC:Enable
5+
-g Reset_on_err:No
6+
-g ConfigRate:2
7+
-g ProgPin:PullUp
8+
-g TckPin:PullUp
9+
-g TdiPin:PullUp
10+
-g TdoPin:PullUp
11+
-g TmsPin:PullUp
12+
-g UnusedPin:PullDown
13+
-g UserID:0xFFFFFFFF
14+
-g ExtMasterCclk_en:No
15+
-g SPI_buswidth:1
16+
-g TIMER_CFG:0xFFFF
17+
-g multipin_wakeup:No
18+
-g StartUpClk:CClk
19+
-g DONE_cycle:4
20+
-g GTS_cycle:5
21+
-g GWE_cycle:6
22+
-g LCK_cycle:NoWait
23+
-g Security:None
24+
-g DonePipe:Yes
25+
-g DriveDone:No
26+
-g en_sw_gsr:No
27+
-g drive_awake:No
28+
-g sw_clk:Startupclk
29+
-g sw_gwe_cycle:5
30+
-g sw_gts_cycle:4
333 KB
Binary file not shown.

Divider_Example/circuit/PSL_Papilio_DUO_LX9.xise

Lines changed: 1067 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<drawing version="7">
3+
<attr value="spartan6" name="DeviceFamilyName">
4+
<trait delete="all:0" />
5+
<trait editname="all:0" />
6+
<trait edittrait="all:0" />
7+
</attr>
8+
<netlist>
9+
<signal name="ARD_RESET" />
10+
<signal name="DUO_SW1" />
11+
<signal name="Arduino_13" />
12+
<signal name="Arduino_48" />
13+
<signal name="Arduino_50" />
14+
<signal name="Arduino_52" />
15+
<signal name="Arduino_5" />
16+
<signal name="Arduino_6" />
17+
<signal name="Arduino_7" />
18+
<signal name="Arduino_8" />
19+
<signal name="Arduino_9" />
20+
<port polarity="Output" name="ARD_RESET" />
21+
<port polarity="Input" name="DUO_SW1" />
22+
<port polarity="Input" name="Arduino_13" />
23+
<port polarity="Output" name="Arduino_48" />
24+
<port polarity="Output" name="Arduino_50" />
25+
<port polarity="Output" name="Arduino_52" />
26+
<port polarity="Output" name="Arduino_5" />
27+
<port polarity="Output" name="Arduino_6" />
28+
<port polarity="Output" name="Arduino_7" />
29+
<port polarity="Output" name="Arduino_8" />
30+
<port polarity="Output" name="Arduino_9" />
31+
<blockdef name="inv">
32+
<timestamp>2000-1-1T10:10:10</timestamp>
33+
<line x2="64" y1="-32" y2="-32" x1="0" />
34+
<line x2="160" y1="-32" y2="-32" x1="224" />
35+
<line x2="128" y1="-64" y2="-32" x1="64" />
36+
<line x2="64" y1="-32" y2="0" x1="128" />
37+
<line x2="64" y1="0" y2="-64" x1="64" />
38+
<circle r="16" cx="144" cy="-32" />
39+
</blockdef>
40+
<blockdef name="obuf">
41+
<timestamp>2009-3-20T10:10:10</timestamp>
42+
<line x2="64" y1="0" y2="-64" x1="64" />
43+
<line x2="64" y1="-32" y2="0" x1="128" />
44+
<line x2="128" y1="-64" y2="-32" x1="64" />
45+
<line x2="64" y1="-32" y2="-32" x1="0" />
46+
<line x2="128" y1="-32" y2="-32" x1="224" />
47+
</blockdef>
48+
<blockdef name="clk_divider">
49+
<timestamp>2015-2-6T1:16:55</timestamp>
50+
<rect width="304" x="64" y="-512" height="512" />
51+
<line x2="0" y1="-480" y2="-480" x1="64" />
52+
<line x2="432" y1="-480" y2="-480" x1="368" />
53+
<line x2="432" y1="-416" y2="-416" x1="368" />
54+
<line x2="432" y1="-352" y2="-352" x1="368" />
55+
<line x2="432" y1="-288" y2="-288" x1="368" />
56+
<line x2="432" y1="-224" y2="-224" x1="368" />
57+
<line x2="432" y1="-160" y2="-160" x1="368" />
58+
<line x2="432" y1="-96" y2="-96" x1="368" />
59+
<line x2="432" y1="-32" y2="-32" x1="368" />
60+
</blockdef>
61+
<block symbolname="inv" name="XLXI_48">
62+
<blockpin signalname="DUO_SW1" name="I" />
63+
<blockpin signalname="ARD_RESET" name="O" />
64+
</block>
65+
<block symbolname="obuf" name="XLXI_63">
66+
<blockpin signalname="Arduino_13" name="I" />
67+
<blockpin signalname="Arduino_48" name="O" />
68+
</block>
69+
<block symbolname="clk_divider" name="XLXI_64">
70+
<blockpin signalname="Arduino_13" name="clk" />
71+
<blockpin signalname="Arduino_50" name="div2" />
72+
<blockpin signalname="Arduino_52" name="div4" />
73+
<blockpin signalname="Arduino_5" name="div8" />
74+
<blockpin signalname="Arduino_6" name="div16" />
75+
<blockpin signalname="Arduino_7" name="div32" />
76+
<blockpin signalname="Arduino_8" name="div64" />
77+
<blockpin signalname="Arduino_9" name="div128" />
78+
<blockpin name="div256" />
79+
</block>
80+
</netlist>
81+
<sheet sheetnum="1" width="3520" height="2720">
82+
<text style="fontsize:64;fontname:Arial" x="2611" y="2656">Version: 1.0</text>
83+
<text style="fontsize:28;fontname:Arial" x="615" y="2564">Replace DUO_SW1 with a Pulldown if you want the ATmega32U4 chip to run when this circuit is loaded.</text>
84+
<branch name="ARD_RESET">
85+
<wire x2="1120" y1="2272" y2="2272" x1="1088" />
86+
</branch>
87+
<instance x="864" y="2304" name="XLXI_48" orien="R0" />
88+
<branch name="DUO_SW1">
89+
<wire x2="864" y1="2272" y2="2272" x1="832" />
90+
</branch>
91+
<text style="fontsize:28;fontname:Arial" x="615" y="2596">Replace DUO_SW1 with a Pullup if you want to disable the ATmega32U4 chip when this circuit is loaded.</text>
92+
<rect width="1468" x="523" y="2228" height="472" />
93+
<text style="fontsize:48;fontname:Arial" x="1075" y="2664">Papilio DUO Reset</text>
94+
<iomarker fontsize="28" x="1120" y="2272" name="ARD_RESET" orien="R0" />
95+
<iomarker fontsize="28" x="832" y="2272" name="DUO_SW1" orien="R180" />
96+
<branch name="Arduino_13">
97+
<wire x2="1328" y1="1120" y2="1120" x1="1264" />
98+
<wire x2="1504" y1="1120" y2="1120" x1="1328" />
99+
<wire x2="1328" y1="672" y2="1120" x1="1328" />
100+
</branch>
101+
<instance x="1328" y="704" name="XLXI_63" orien="R0" />
102+
<branch name="Arduino_48">
103+
<wire x2="1584" y1="672" y2="672" x1="1552" />
104+
</branch>
105+
<instance x="1504" y="1600" name="XLXI_64" orien="R0">
106+
</instance>
107+
<branch name="Arduino_50">
108+
<wire x2="1968" y1="1120" y2="1120" x1="1936" />
109+
</branch>
110+
<branch name="Arduino_52">
111+
<wire x2="1968" y1="1184" y2="1184" x1="1936" />
112+
</branch>
113+
<iomarker fontsize="28" x="1264" y="1120" name="Arduino_13" orien="R180" />
114+
<iomarker fontsize="28" x="1584" y="672" name="Arduino_48" orien="R0" />
115+
<iomarker fontsize="28" x="1968" y="1120" name="Arduino_50" orien="R0" />
116+
<iomarker fontsize="28" x="1968" y="1184" name="Arduino_52" orien="R0" />
117+
<branch name="Arduino_5">
118+
<wire x2="1968" y1="1248" y2="1248" x1="1936" />
119+
</branch>
120+
<iomarker fontsize="28" x="1968" y="1248" name="Arduino_5" orien="R0" />
121+
<branch name="Arduino_6">
122+
<wire x2="1968" y1="1312" y2="1312" x1="1936" />
123+
</branch>
124+
<iomarker fontsize="28" x="1968" y="1312" name="Arduino_6" orien="R0" />
125+
<branch name="Arduino_7">
126+
<wire x2="1968" y1="1376" y2="1376" x1="1936" />
127+
</branch>
128+
<iomarker fontsize="28" x="1968" y="1376" name="Arduino_7" orien="R0" />
129+
<branch name="Arduino_8">
130+
<wire x2="1968" y1="1440" y2="1440" x1="1936" />
131+
</branch>
132+
<iomarker fontsize="28" x="1968" y="1440" name="Arduino_8" orien="R0" />
133+
<branch name="Arduino_9">
134+
<wire x2="1968" y1="1504" y2="1504" x1="1936" />
135+
</branch>
136+
<iomarker fontsize="28" x="1968" y="1504" name="Arduino_9" orien="R0" />
137+
</sheet>
138+
</drawing>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
mkdir 250K\xst\projnav.tmp
2+
mkdir 500K\xst\projnav.tmp
3+
mkdir LX9\xst\projnav.tmp
4+
mkdir DUO_LX9\xst\projnav.tmp
5+
cd DUO_LX9
6+
start Papilio_DUO_LX9.cmd
7+
cd LX9
8+
start Papilio_Pro.cmd
9+
REM clean.bat
10+
REM mkdir xst\projnav.tmp
11+
cd ..\500K
12+
start Papilio_One_500K.cmd
13+
REM clean.bat
14+
REM mkdir xst\projnav.tmp
15+
cd ..\250K
16+
start Papilio_One_250K.cmd
17+
pause
18+
clean.bat

Divider_Example/circuit/clean.bat

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
@setlocal enableextensions enabledelayedexpansion
2+
set startdir=%cd%
3+
set temp=%startdir%
4+
set folder=
5+
:loop
6+
if not "x%temp:~-1%"=="x\" (
7+
set folder=!temp:~-1!!folder!
8+
set temp=!temp:~0,-1!
9+
goto :loop
10+
)
11+
echo.startdir = %startdir%
12+
echo.folder = %folder%
13+
endlocal && set folder=%folder%
14+
15+
REM Deletes all unnecessary files
16+
for /f %%F in ('dir /b /a-d ^| findstr /vile ".sch .xise .bit .bat .sym .vhd .pdf .ino .cmd_log .cmd .xst .prj .vhf .ut .h .cpp .xtcl keywords.txt"') do del "%%F"
17+
REM for /f %%F in ('dir /b ^| findstr /vile "Sketch saved_bitfiles rebuild LX9 500K 250K smallfs ols-0.9.7 Libraries ym_converter"') do rmdir /q /s "%%F"
18+
rmdir /q /s iseconfig
19+
20+
if exist LX9 (
21+
cd LX9
22+
move Papilio_Pro.cmd_log Papilio_Pro.cmd
23+
for /f %%F in ('dir /b /a-d ^| findstr /vile ".sch .xise .bit .bat .sym .vhd .pdf .ino .cmd_log .cmd .xst .prj .vhf .ut .html .wcfg"') do del "%%F"
24+
for /f %%F in ('dir /b ^| findstr /vile "Sketch saved_bitfiles rebuild LX9 500K 250K"') do rmdir /q /s "%%F"
25+
cd ..
26+
)
27+
if exist 250K (
28+
cd 250K
29+
move Papilio_One_250K.cmd_log Papilio_One_250K.cmd
30+
for /f %%F in ('dir /b /a-d ^| findstr /vile ".sch .xise .bit .bat .sym .vhd .pdf .ino .cmd_log .cmd .xst .prj .vhf .ut .html .wcfg"') do del "%%F"
31+
for /f %%F in ('dir /b ^| findstr /vile "Sketch saved_bitfiles rebuild LX9 500K 250K"') do rmdir /q /s "%%F"
32+
cd ..
33+
)
34+
if exist 500K (
35+
cd 500K
36+
move Papilio_One_500K.cmd_log Papilio_One_500K.cmd
37+
for /f %%F in ('dir /b /a-d ^| findstr /vile ".sch .xise .bit .bat .sym .vhd .pdf .ino .cmd_log .cmd .xst .prj .vhf .ut .html .wcfg"') do del "%%F"
38+
for /f %%F in ('dir /b ^| findstr /vile "Sketch saved_bitfiles rebuild LX9 500K 250K"') do rmdir /q /s "%%F"
39+
cd ..
40+
)
41+
if exist DUO_LX9 (
42+
cd DUO_LX9
43+
move Papilio_DUO_LX9.cmd_log Papilio_DUO_LX9.cmd
44+
for /f %%F in ('dir /b /a-d ^| findstr /vile ".sch .xise .bit .bat .sym .vhd .pdf .ino .cmd_log .cmd .xst .prj .vhf .ut .html .wcfg"') do del "%%F"
45+
for /f %%F in ('dir /b ^| findstr /vile "Sketch saved_bitfiles rebuild LX9 500K 250K"') do rmdir /q /s "%%F"
46+
cd ..
47+
)
9.44 KB
Binary file not shown.

0 commit comments

Comments
 (0)