BIT4 is a 4Bit microcontroller – fully programmable with only three buttons.

BIT4 is a 4Bit microcontroller – fully programmable with only three buttons.

BIT4 is a 4Bit microcontroller – fully programmable with only three buttons.

The BIT4 microcontroller has 256 Bytes of programm memory, split in 16 pages with each 16 instructions. A instruction is 8bit wide and consists of an command and data:

To enter the programming mode, hold BTN2 down, press the RESET button once and then release BTN2. In programming mode, step through the instructions with BTN2. When going to a new instruction, the leds will show the current address for a fraktion of a second. With BTN1 the value of the command and data of the current instruction can be changed. When stepping to a new address with BTN2, the instuction of the address above gets saved in the EEPROM. At the end, press RESET to leave the programming mode and to start the programm execution.

all design files are available on github.com

Please follow and like us:
Pin Share
About mixos

Mike is the founder and editor of Electronics-Lab.com, an electronics engineering community/news and project sharing platform. He studied Electronics and Physics and enjoys everything that has moving electrons and fun. His interests lying on solar cells, microcontrollers and switchmode power supplies. Feel free to reach him for feedback, random tips or just to say hello :-)

view all posts by admin
Subscribe
Notify of
guest

7 Comments
Inline Feedbacks
View all comments
Óscar A.V.

Hello, thanks a lot for sharing the project. I have some questions,

Do you use a different array for program and memory, like a Harvard architecture? Or you just use a memory array for data and instructions? It seems based on the readme, that you deal with bytes and separate them in nibbles to work with later. Did you write everything by yourself? Or did you use some libraries?

Just to finish, I was thinking if it is difficult to extend TPS, or BIT4, to make things with relays, like a PLC, but instead of programming it with Ladder, programming it with the three buttons. That would be very nice, maybe it is already done, but for people like you with knowledge maybe it is not that difficult. You could control garage doors, etc.

Thank you very much for your attention.

Uhlmann

where can I get it?

Copin

It would be better with 512 bytes

Copin

NOP,RTS JMP,JSR,JEQ,JNE xXX SHL,ASR,LSR,NEG,ROR,ROL,DA,COM,TST BNK b

BCLR,BSET,BTST,BTG n LD,CMP,ADD,ADC #X OR,AND,ADD,ADC,SUB,SBB,LD,ST,CMP A,X

Copin

512×12 :

NOP,RTI,RTS LD,ST A1,A0+ LPM bnk,A+,xX JMP xXX JSR XX SKBC,SKBS n,xX

SHL,ASR,LSR,ROL,ROR,PUSH,PULL Ai INC,DEC,DA,COM,DSZ,SKZ,SNZ xX BCLR,BSET n,xX

LD,CMP,TST,OR,AND,XOR,ADD,ADC,SUB,SBB Ai,#X Ai,xX ST,SWP Ai,xX

Copin

2Kx12 rom
128×4 ram

NOP,RTS JSR xXX TJZ,TJNZ R,#X,XXX xX,XXX OR,AND CC,#X
SHL,ASR,LSR,ROR,ROL,DAA  INC,DEC,COM,ADC xX LD,ST R,xX LDA #X
SWAP,TST A,xX OR,AND,XOR,ADD,ADC,SUB,SBB,CMP A,#X A,xX

Copin

NOP,RTS,PWD,SHL,ASR,LSR,NEG,ROL,ROR,DA,COM,TST JMP,JSR,JEQ,JNE,JCC,JCS xXX MOV,OR,AND,TST X,X

BNK n BCLR,BSET,BTST,BTG n LD,CMP,ADD,ADC #X OR,AND,ADD,ADC,SUB,SBB,LD,ST,CMP A,X

Get new posts by email:
Get new posts by email:

Join 97,426 other subscribers

Archives