Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #132494
| Newsgroups | comp.lang.forth |
|---|---|
| References | <87frpoewse.fsf@nightsong.com> <nnd$3d8918a3$47abdf13@03dd132c1b0f3b13> <vf5sit$2gjqb$1@paganini.bofh.team> <vfhgqc$3sajh$1@paganini.bofh.team> |
| From | albert@spenarnc.xs4all.nl |
| Subject | Re: 1 euro Olimex RISC-V mini-PC: this needs Forth ;) |
| Message-ID | <nnd$3c99179e$3dd4b32f@6cc2be919654136f> (permalink) |
| Organization | KPN B.V. |
| Date | 2024-10-26 10:48 +0200 |
In article <vfhgqc$3sajh$1@paganini.bofh.team>, Waldek Hebisch <antispam@fricas.org> wrote: >Waldek Hebisch <antispam@fricas.org> wrote: <SNIP> >Milkv Duos have 5 GPIO ports, formally 32-bit but many lines are >not connected to outputs. One port in RTC block and has >base address 0x05021000, the other ports are at 0x03020000 + n*0x1000 >where n is port number. Output register is at offset 0, at offset >4 is direction register (setting bit to 1 means that line is an >output). At offset 0x50 is input register. Other registers >deal with interrupts. > >ATM I have the following: > >HEX >: LBIS DUP L@ ROT OR SWAP L! ; >: LBIC DUP L@ ROT INVERT AND SWAP L! ; These boards are all 32 bits io. So I lifted the BIS and BIC from ARM boards into riscv. So you can use BIS instead of LBIS, BIC instead of LBIC. Of course they are in assembler, as these low level words must be. >: gpio-base DUP 4 = IF DROP 2001000 ELSE 1000 * THEN VMA-IO @ + 20000 + ; >: bit-data 20 /MOD SWAP 1 SWAP LSHIFT SWAP gpio-base ; >: gpio-on bit-data LBIS ; >: gpio-off bit-data LBIC ; > >which outputs bits to data register. To get actual output one >need to set direction register and associate PIN with GPIO function. I defined set-function by ( fun# gpio#) and redefine fun# that I always 0 for input , -1 for output. This make a 1602 driver almost portable except for defining the port numbers/ >-- > Waldek Hebisch Groetjes Albert -- Temu exploits Christians: (Disclaimer, only 10 apostles) Last Supper Acrylic Suncatcher - 15Cm Round Stained Glass- Style Wall Art For Home, Office And Garden Decor - Perfect For Windows, Bars, And Gifts For Friends Family And Colleagues.
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar
1 euro Olimex RISC-V mini-PC: this needs Forth ;) Paul Rubin <no.email@nospam.invalid> - 2024-09-24 11:22 -0700
Re: 1 euro Olimex RISC-V mini-PC: this needs Forth ;) dxf <dxforth@gmail.com> - 2024-09-25 11:03 +1000
Re: 1 euro Olimex RISC-V mini-PC: this needs Forth ;) Paul Rubin <no.email@nospam.invalid> - 2024-09-24 20:37 -0700
Re: 1 euro Olimex RISC-V mini-PC: this needs Forth ;) dxf <dxforth@gmail.com> - 2024-09-25 14:11 +1000
Re: 1 euro Olimex RISC-V mini-PC: this needs Forth ;) Paul Rubin <no.email@nospam.invalid> - 2024-09-24 22:00 -0700
Re: 1 euro Olimex RISC-V mini-PC: this needs Forth ;) antispam@fricas.org (Waldek Hebisch) - 2024-09-29 03:36 +0000
Re: 1 euro Olimex RISC-V mini-PC: this needs Forth ;) zbigniew2011@gmail.com (LIT) - 2024-09-29 13:30 +0000
Re: 1 euro Olimex RISC-V mini-PC: this needs Forth ;) dxf <dxforth@gmail.com> - 2024-09-30 00:26 +1000
Re: 1 euro Olimex RISC-V mini-PC: this needs Forth ;) zbigniew2011@gmail.com (LIT) - 2024-09-29 14:51 +0000
Re: 1 euro Olimex RISC-V mini-PC: this needs Forth ;) dxf <dxforth@gmail.com> - 2024-09-30 13:57 +1000
Re: 1 euro Olimex RISC-V mini-PC: this needs Forth ;) zbigniew2011@gmail.com (LIT) - 2024-09-30 07:54 +0000
Re: 1 euro Olimex RISC-V mini-PC: this needs Forth ;) dxf <dxforth@gmail.com> - 2024-09-30 19:08 +1000
Re: 1 euro Olimex RISC-V mini-PC: this needs Forth ;) zbigniew2011@gmail.com (LIT) - 2024-09-28 17:06 +0000
Re: 1 euro Olimex RISC-V mini-PC: this needs Forth ;) David De La Harpe Golden <david@harpegolden.net> - 2024-09-25 16:20 +0100
Re: 1 euro Olimex RISC-V mini-PC: this needs Forth ;) antispam@fricas.org (Waldek Hebisch) - 2024-09-29 03:20 +0000
Re: 1 euro Olimex RISC-V mini-PC: this needs Forth ;) zbigniew2011@gmail.com (LIT) - 2024-09-29 21:46 +0000
Re: 1 euro Olimex RISC-V mini-PC: this needs Forth ;) Paul Rubin <no.email@nospam.invalid> - 2024-09-29 15:23 -0700
Re: 1 euro Olimex RISC-V mini-PC: this needs Forth ;) zbigniew2011@gmail.com (LIT) - 2024-09-29 22:31 +0000
Re: 1 euro Olimex RISC-V mini-PC: this needs Forth ;) Paul Rubin <no.email@nospam.invalid> - 2024-09-29 15:59 -0700
Re: 1 euro Olimex RISC-V mini-PC: this needs Forth ;) antispam@fricas.org (Waldek Hebisch) - 2024-10-17 15:28 +0000
Re: 1 euro Olimex RISC-V mini-PC: this needs Forth ;) zbigniew2011@gmail.com (LIT) - 2024-10-17 20:42 +0000
Re: 1 euro Olimex RISC-V mini-PC: this needs Forth ;) antispam@fricas.org (Waldek Hebisch) - 2024-10-18 02:21 +0000
Re: 1 euro Olimex RISC-V mini-PC: this needs Forth ;) albert@spenarnc.xs4all.nl - 2024-10-18 11:36 +0200
Re: 1 euro Olimex RISC-V mini-PC: this needs Forth ;) antispam@fricas.org (Waldek Hebisch) - 2024-10-18 14:14 +0000
Re: 1 euro Olimex RISC-V mini-PC: this needs Forth ;) albert@spenarnc.xs4all.nl - 2024-10-19 13:20 +0200
Re: 1 euro Olimex RISC-V mini-PC: this needs Forth ;) antispam@fricas.org (Waldek Hebisch) - 2024-10-21 10:24 +0000
Re: 1 euro Olimex RISC-V mini-PC: this needs Forth ;) albert@spenarnc.xs4all.nl - 2024-10-21 13:26 +0200
Re: 1 euro Olimex RISC-V mini-PC: this needs Forth ;) antispam@fricas.org (Waldek Hebisch) - 2024-10-21 15:39 +0000
Re: 1 euro Olimex RISC-V mini-PC: this needs Forth ;) albert@spenarnc.xs4all.nl - 2024-10-21 21:03 +0200
Re: 1 euro Olimex RISC-V mini-PC: this needs Forth ;) antispam@fricas.org (Waldek Hebisch) - 2024-10-23 02:32 +0000
Re: 1 euro Olimex RISC-V mini-PC: this needs Forth ;) albert@spenarnc.xs4all.nl - 2024-10-23 13:17 +0200
Re: 1 euro Olimex RISC-V mini-PC: this needs Forth ;) antispam@fricas.org (Waldek Hebisch) - 2024-10-26 01:31 +0000
Re: 1 euro Olimex RISC-V mini-PC: this needs Forth ;) albert@spenarnc.xs4all.nl - 2024-10-26 10:22 +0200
Re: 1 euro Olimex RISC-V mini-PC: this needs Forth ;) antispam@fricas.org (Waldek Hebisch) - 2024-10-26 19:23 +0000
Re: 1 euro Olimex RISC-V mini-PC: this needs Forth ;) albert@spenarnc.xs4all.nl - 2024-10-27 10:52 +0100
Re: 1 euro Olimex RISC-V mini-PC: this needs Forth ;) albert@spenarnc.xs4all.nl - 2024-10-26 10:48 +0200
Re: 1 euro Olimex RISC-V mini-PC: this needs Forth ;) antispam@fricas.org (Waldek Hebisch) - 2024-10-26 21:01 +0000
Re: 1 euro Olimex RISC-V mini-PC: this needs Forth ;) albert@spenarnc.xs4all.nl - 2024-10-27 11:12 +0100
csiph-web