How Turn Nema Stepper Motor With Cnc Shield V4.0 in Avr Assembly Atmega328

by BoboacaC in Teachers > Pre-K

39 Views, 0 Favorites, 0 Comments

How Turn Nema Stepper Motor With Cnc Shield V4.0 in Avr Assembly Atmega328

how turn stepper motor with avr assembly and arduino nano cnc shield v4.0 - costycnc
Progetto senza titolo.jpg
1.jpg

This tutorial explain how turn a unipolar stepper motor with cnc shield v4.0 directly from avr assembly and compile ,upload directly from web (with webusb)

Supplies

stepper nema17

cnc shield v4.0

online compiler uploader

https://costycnc.github.io/avr-compiler-js#shieldv40

The Code

.org 0x60

;arduino nano cnc shield v4.0

sbi 4,0 ;pin DIR as output D8 PORTB,PB0

sbi 0xa,5 ;pin STEP as output D5 PORTD,PD5

cbi 5,0 ;enable DIR pin D8 -put high

init:

sbi 0xb,5 ;put pin STEP high

rcall pause ;pause

cbi 0xb,5 ;put pin STEP low

rcall pause ;pause

rjmp init ;repeat


pause:

dec R16

brne pause

ret