Do zmiany STEP_PORT_DUAL na inny port w AVT
Znaleziono 2 wyniki
Wróć do „GRBL i dwa silniki na oś”
- 18 cze 2020, 06:07
- Forum: Elektronika CNC
- Temat: GRBL i dwa silniki na oś
- Odpowiedzi: 27
- Odsłony: 3719
Re: GRBL i dwa silniki na oś
Do zmiany STEP_PORT_DUAL na inny port w AVT
- 17 cze 2020, 17:38
- Forum: Elektronika CNC
- Temat: GRBL i dwa silniki na oś
- Odpowiedzi: 27
- Odsłony: 3719
Re: GRBL i dwa silniki na oś
w cpu_map jest :
#define STEP_DDR_DUAL DDRC
#define STEP_PORT_DUAL PORTC
#define DUAL_STEP_BIT 4 // Uno Digital Pin 12
#define STEP_MASK_DUAL ((1<<DUAL_STEP_BIT))
#define DIRECTION_DDR_DUAL DDRB
#define DIRECTION_PORT_DUAL PORTB
#define DUAL_DIRECTION_BIT 5 // Uno Digital Pin 13
#define DIRECTION_MASK_DUAL ((1<<DUAL_DIRECTION_BIT))
możesz dać na samum końcu tego pliku :
#ifdefine STEP_DDR_DUAL
#undef STEP_DDR_DUAL
#undef DUAL_STEP_BIT
#undef STEP_MASK_DUAL
#undef DIRECTION_DDR_DUAL
#undef DIRECTION_PORT_DUAL
#undef DUAL_DIRECTION_BIT 5
#undef DIRECTION_MASK_DUAL
#endif
a potem :
twój port i PIN
#define STEP_DDR_DUAL DDRD
#define STEP_PORT_DUAL PORTD
#define DUAL_STEP_BIT 4 // nr pinu STEP
#define STEP_MASK_DUAL ((1<<DUAL_STEP_BIT))
#define DIRECTION_DDR_DUAL DDRD
#define DIRECTION_PORT_DUAL PORTD
#define DUAL_DIRECTION_BIT 5 (nr pinu do DIR jaki chcesz dać
#define DIRECTION_MASK_DUAL ((1<<DUAL_DIRECTION_BIT))
aby kompilator nie wyrzucał błedów przy komplilacji
nie sprawdzałem ale powinno śmigać ,
to tak na szybko z programowania w C
#define STEP_DDR_DUAL DDRC
#define STEP_PORT_DUAL PORTC
#define DUAL_STEP_BIT 4 // Uno Digital Pin 12
#define STEP_MASK_DUAL ((1<<DUAL_STEP_BIT))
#define DIRECTION_DDR_DUAL DDRB
#define DIRECTION_PORT_DUAL PORTB
#define DUAL_DIRECTION_BIT 5 // Uno Digital Pin 13
#define DIRECTION_MASK_DUAL ((1<<DUAL_DIRECTION_BIT))
możesz dać na samum końcu tego pliku :
#ifdefine STEP_DDR_DUAL
#undef STEP_DDR_DUAL
#undef DUAL_STEP_BIT
#undef STEP_MASK_DUAL
#undef DIRECTION_DDR_DUAL
#undef DIRECTION_PORT_DUAL
#undef DUAL_DIRECTION_BIT 5
#undef DIRECTION_MASK_DUAL
#endif
a potem :
twój port i PIN
#define STEP_DDR_DUAL DDRD
#define STEP_PORT_DUAL PORTD
#define DUAL_STEP_BIT 4 // nr pinu STEP
#define STEP_MASK_DUAL ((1<<DUAL_STEP_BIT))
#define DIRECTION_DDR_DUAL DDRD
#define DIRECTION_PORT_DUAL PORTD
#define DUAL_DIRECTION_BIT 5 (nr pinu do DIR jaki chcesz dać
#define DIRECTION_MASK_DUAL ((1<<DUAL_DIRECTION_BIT))
aby kompilator nie wyrzucał błedów przy komplilacji

nie sprawdzałem ale powinno śmigać ,
to tak na szybko z programowania w C