Skip to content

Commit

Permalink
mecrisp-stellaris-ra-1.1 from Matthias
Browse files Browse the repository at this point in the history
  • Loading branch information
jjonethal committed Nov 1, 2015
1 parent 09ea023 commit de7beb4
Show file tree
Hide file tree
Showing 66 changed files with 21,458 additions and 19,001 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -407,3 +407,14 @@
- Removed align4, as it has been identical with align
- Improved maintainability of the code
- Small improvements under the hood here and there

28.10.2015, Matthias Koch, Mecrisp-Stellaris 2.1.6

- Many new examples for Teensy 3.1 by Andreas Wagner
- Bugfix for STM32L152 vector map and additional interrupt vectors,
more examples for STM L152 Discovery by Абдрахимов Илья

31.10.2015, Matthias Koch, Mecrisp-Stellaris RA 1.1

- Merged news from 2.1.6 into this package
- Improved tuck
3 changes: 2 additions & 1 deletion CREDITS
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ Examples for LPC1114FN28 by Bert Lohmann
Nucleo STM32F411 port by Jean Jonethal
An example for a custom prompt by Glen Worstell
Syscall usage examples by Ulrich Hoffmann
Discovery L152 port by Абдрахимов Илья
Discovery L152 port and examples by Абдрахимов Илья
Many MK20DX256 examples by Andreas Wagner

Hardware donations:

Expand Down
Binary file modified kl25z128-ra/mecrisp-stellaris-kl25z128.bin
Binary file not shown.
2,498 changes: 1,249 additions & 1,249 deletions kl25z128/mecrisp-stellaris-kl25z128.srec

Large diffs are not rendered by default.

Binary file modified linux-ra/mecrisp-stellaris-linux
Binary file not shown.
Binary file modified lm4f120-ra/mecrisp-stellaris-lm4f120.bin
Binary file not shown.
Binary file modified lpc1114fn28-ra/mecrisp-stellaris-lpc1114fn28.bin
Binary file not shown.
2,442 changes: 1,221 additions & 1,221 deletions lpc1114fn28-ra/mecrisp-stellaris-lpc1114fn28.hex

Large diffs are not rendered by default.

290 changes: 145 additions & 145 deletions lpc1114fn28/lcd_164.txt
Original file line number Diff line number Diff line change
@@ -1,145 +1,145 @@
\ Display EA W164B-NLW 8 Bit Modus
\ analog Eingang P0.11
\ analoge Spannung wird im Display angezeigt


$50003FFC constant P0DATA
$50008000 constant P0DIR
$50013FFC constant P1DATA
$50018000 constant P1DIR

$40048080 constant CLKCTRL
$40048238 constant PDRUNCFG
$4001C000 constant AD0CR
$4001C004 constant AD0GDR



: Portshift ( x -- y ) \ test auf bit 6 u 7 schiebe sie 2 nach links setze die positionen 6 u 7 auf 0
%11111111 and \ setze alle bits im oberen byte auf 0
dup %11000000 and \ isoliere die beiden bits
2 lshift or \ schiebe nach links, setze bits
%1100111111 and \ sezte bit 6 u 7 auf 0
;

: ms 0 ?do 750 0 do i dup * drop loop loop ; ( n --) \ warte n ms

: pp0 p0data ! ;
: pp1 Portshift p1data ! ;


\ -----------------------
\ LCD Commands
\ -----------------------

: en
pp1
%001000000 pp0 1 ms
0 pp0 1 ms
%001000000 pp0 1 ms
;

: wr ( byte -- ) \ Byte ASCII ins Display
pp1
%101000000 pp0 1 ms
%100000000 pp0 1 ms
%101000000 pp0 1 ms
;

: DispShiftr %00011100 en ;
: DispShiftl %00011000 en ;
: CursShiftr %00010100 en ;
: CursShiftl %00010000 en ;
: goto %10000000 or en ;
: zeile1 $80 en ;
: zeile2 $C0 en ;
: zeile3 $90 en ;
: zeile4 $D0 en ;


: ini164 ( -- )
$38 en \ 8-Bit
$0F en \ Display ein, Cursor ein
$01 en \ clear Display
$06 en \ Cursor Auto-Increment
;


: LCD-ini ( -- )
$C0 $4004404C ! \ Port 0.6 Enable
$C0 $40044050 ! \ Port 0.7 W/R
$C0 $40044060 ! \ Port 0.8 RS

$42 $40044074 ! \ P0.11 analog Eingang

$C1 $40044078 ! \ P1.0 DigIO D0
$C1 $4004407C ! \ P1.1 DigIO D1
$C1 $40044080 ! \ P1.2 DigIO D2
$C1 $40044090 ! \ P1.3 DigIO D3
$C0 $40044094 ! \ P1.4 DigIO D4
$C0 $400440A0 ! \ P1.5 DigIO D5
$C0 $40044014 ! \ P1.8 DigIO D6
$C0 $40044038 ! \ P1.9 DigIO D7

%00111110000 P0DIR !
%1111111111 P1DIR !
1 13 lshift CLKCTRL bis!
1 4 lshift PDRUNCFG bic!
ini164
;


\ -------------------------
\ analog Eingang aktivieren
\ -------------------------

: analog ( n -- n ) \ analog Eingang n
1 swap lshift
4 8 lshift or
1 24 lshift or
AD0CR !
begin 1 31 lshift AD0GDR bit@ until
AD0GDR @ 6 rshift $3ff and
;


\ -----------------------
\ Display Commands
\ -----------------------

: DigitToLCD .digit wr ; ( number -- )

: TextToLCD 0 do dup c@ wr 1 + loop drop ;

: NumberToLCD ( n -- ) \ 4 stellige Zahl ins Display
4 1 do 10 /mod loop
4 0 do DigitToLCD loop
;

: Disp
begin
0 analog
dup
zeile1
NumberToLCD
s" Digits " TextToLCD
zeile2
330 * 1024 / \ analogwert auf 3,3Volt skalieren
10 /mod
10 /mod
DigitToLCD
s" ." TextToLCD
DigitToLCD
DigitToLCD
s" Volt " TextToLCD
key?
until
;


\ -------------------


LCD-ini
Disp

\ Display EA W164B-NLW 8 Bit Modus
\ analog Eingang P0.11
\ analoge Spannung wird im Display angezeigt
$50003FFC constant P0DATA
$50008000 constant P0DIR
$50013FFC constant P1DATA
$50018000 constant P1DIR
$40048080 constant CLKCTRL
$40048238 constant PDRUNCFG
$4001C000 constant AD0CR
$4001C004 constant AD0GDR
: Portshift ( x -- y ) \ test auf bit 6 u 7 schiebe sie 2 nach links setze die positionen 6 u 7 auf 0
%11111111 and \ setze alle bits im oberen byte auf 0
dup %11000000 and \ isoliere die beiden bits
2 lshift or \ schiebe nach links, setze bits
%1100111111 and \ sezte bit 6 u 7 auf 0
;
: ms 0 ?do 750 0 do i dup * drop loop loop ; ( n --) \ warte n ms
: pp0 p0data ! ;
: pp1 Portshift p1data ! ;
\ -----------------------
\ LCD Commands
\ -----------------------
: en
pp1
%001000000 pp0 1 ms
0 pp0 1 ms
%001000000 pp0 1 ms
;
: wr ( byte -- ) \ Byte ASCII ins Display
pp1
%101000000 pp0 1 ms
%100000000 pp0 1 ms
%101000000 pp0 1 ms
;
: DispShiftr %00011100 en ;
: DispShiftl %00011000 en ;
: CursShiftr %00010100 en ;
: CursShiftl %00010000 en ;
: goto %10000000 or en ;
: zeile1 $80 en ;
: zeile2 $C0 en ;
: zeile3 $90 en ;
: zeile4 $D0 en ;
: ini164 ( -- )
$38 en \ 8-Bit
$0F en \ Display ein, Cursor ein
$01 en \ clear Display
$06 en \ Cursor Auto-Increment
;
: LCD-ini ( -- )
$C0 $4004404C ! \ Port 0.6 Enable
$C0 $40044050 ! \ Port 0.7 W/R
$C0 $40044060 ! \ Port 0.8 RS
$42 $40044074 ! \ P0.11 analog Eingang
$C1 $40044078 ! \ P1.0 DigIO D0
$C1 $4004407C ! \ P1.1 DigIO D1
$C1 $40044080 ! \ P1.2 DigIO D2
$C1 $40044090 ! \ P1.3 DigIO D3
$C0 $40044094 ! \ P1.4 DigIO D4
$C0 $400440A0 ! \ P1.5 DigIO D5
$C0 $40044014 ! \ P1.8 DigIO D6
$C0 $40044038 ! \ P1.9 DigIO D7
%00111110000 P0DIR !
%1111111111 P1DIR !
1 13 lshift CLKCTRL bis!
1 4 lshift PDRUNCFG bic!
ini164
;
\ -------------------------
\ analog Eingang aktivieren
\ -------------------------
: analog ( n -- n ) \ analog Eingang n
1 swap lshift
4 8 lshift or
1 24 lshift or
AD0CR !
begin 1 31 lshift AD0GDR bit@ until
AD0GDR @ 6 rshift $3ff and
;
\ -----------------------
\ Display Commands
\ -----------------------
: DigitToLCD .digit wr ; ( number -- )
: TextToLCD 0 do dup c@ wr 1 + loop drop ;
: NumberToLCD ( n -- ) \ 4 stellige Zahl ins Display
4 1 do 10 /mod loop
4 0 do DigitToLCD loop
;
: Disp
begin
0 analog
dup
zeile1
NumberToLCD
s" Digits " TextToLCD
zeile2
330 * 1024 / \ analogwert auf 3,3Volt skalieren
10 /mod
10 /mod
DigitToLCD
s" ." TextToLCD
DigitToLCD
DigitToLCD
s" Volt " TextToLCD
key?
until
;
\ -------------------
LCD-ini
Disp
Loading

0 comments on commit de7beb4

Please sign in to comment.