Minimal mode to write hex to arduino

see Opcodes and see Atmega328p datasheet asm and dasm--linebreak---LINEBREAK---AVR---AVR1

Attention !!! Not all asm codes is implemented !!!-until now only (LDI,OUT,RJMP,BRNE,DEC,INC,EOR,RET,RCALL,CBI,SBI,SBIC,SBRC,NOP)
If you want contribute at this profect ,you are welcome!!!

00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00

AsmCODE

How to compile asm to hex download kit from here

Thanks to https://github.com/dbuezas/arduino-web-uploader

web-serial-terminal (https://bipes.net.br/aroca/web-serial-terminal/)
Clicca qui per Tutorial come ricaricare firmware in macchina taglia polistirolo costycnc
Click here for Tutorial refirmware costycnc macchine

download costycnc hex firmware for CostycNC foam cutter cnc

avr 8bit machine codes

Command Register Value Result
R

arduino nano V3.0 mini usb digital pins
arduino nano V3.0 mini usb digital pins
atmega328 dip-28 digital pins
atmega328p TQFP digitals pin

code used in this video above
(used arduino nano)
buzzer -D13 and GND

sus:
sbi 5,5
rcall delay
cbi 5,5
rcall delay
rjmp sus
delay:
ldi r17,10
loop:
dec r16
brne loop
dec r17
brne loop
ret


code used in this video above
(used arduino nano)
IR 1 - PB0
IR 2 - PB1
Module L293:
IN1 - PB5
IN2 - PB4
All powered by arduino 5 volt

ASM CODE:

begin:
cbi 5,5
sbi 5,4 ; girare nastro trasportatore a sinistra
sbic 3,0 ; Controlla il sensor1 conesso a PINB0
rjmp begin ; Se e 0, salta all'inizio del ciclo
sbic 3,1 ; Controlla il sensor conesso a PINB1
rjmp jos ; Se e 0, salta all'inizio del ciclo
sbi 5,5
rcall pause
cbi 5,4 ; girare nastro trasportatore a destra
rcall pause
rjmp begin
jos:
sbi 5,5 ; stop motor
rcall pause
cbi 5,5 ; start motor
rcall pause
rjmp begin
pause:
dec r20 ; crea una pausa di qualche secondo
brne pause
dec r19
brne pause
dec r18
brne pause
ret

View My Stats

Shure! You can't write advanced program in asm code ...

as this guy hilariously explains HERE

Why in this page i chose avr asm for atmega328?

Because is most known and sell microcontroller and because they are among the simplest architectures in the world