Pages: [1]   Go Down
Author Topic: Full H-bridge (mega = > due) controlled by ElectroShaman Java GUI  (Read 666 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Sr. Member
Karma: 0
Posts: 262
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Please find detailed video instructions on how to modify the arduino sketch to Java control a full H-bridge driver

Runs on Arduino MEGA, requires ElectroShaman v2.0.5 on Win/MAC to manage operational parameters

Almost fully compatible on Arduino DUE requiring only to change timer4 initialization and ISR4 (Interrupt routine).

If somebody would be willing to migrate these three parts of the code from MEGA to DUE where 99% of the code is already due compatible and USB java.

Thanks in advance, Albert

// select output pins & initialize timer4
  pinMode(outputPinH1H2, OUTPUT);
  pinMode(outputPinH3H4, OUTPUT);
  TCCR4A = B00111001; // Phase and Frequency correct at OCR5A
  TCCR4B = B10001;    // prescaling by 1 the system clock
  TIMSK4 = B1; // ISR management to detect OverFlow
  TIFR4 = B1;

// always use TCNT different than ZERO because of multiple TCNT's AVR bug not updating correctly if TCNT=0

  if(token == 1){
« Last Edit: August 26, 2014, 01:29:56 pm by selfonlypath » Logged

Pages: [1]   Go Up
Jump to: