Trying to find an alternative microcontroller for an atmega8 "rom".

FIrst of all I have no experience with arduino platform and limited knowledge in electronics.
I found a detail guide on how to build a cheap cnc hot wire cutter for college and I want to build it.

The guy who made it also provides a .hex and .bas file that I pressume goes intot he atmega8 controller. He listed the required piece as an Atmega8a-pu.

The problem is, I can't find one in Bucharest after searching for 2 months. The ones that I did find are:

  • Atmega8(L)-8Pu
  • Atmega8-16PU

From what I gatherer these are older models than the A variant, running at 8 and 16mhz respectively with more power consumption. Will the 16PU variant work? Can I power it and two other 5v stepper motors using only a usb to ttl adapter pl2303?

I attached the hex and bas files if they help and also the links to this project.

Thanks.

cnc.zip (977 Bytes)

daskallu:
The guy who made it also provides a .hex and .bas file that I pressume goes intot he atmega8 controller. He listed the required piece as an Atmega8a-pu.

So what about eBay and ordering one from the Netherlands?

It's a very simple program that can be easily adapted to the Arduino. A direct translation would look like the code below. It would be good to change the direct port manipulation to calls to the Stepper library. It accepts characters from the serial port and, for inputs of 'A', 'B', 'C', or 'D', runs the X or Y stepper Forward or Backward about 20 steps (5 times 8 half-steps).

const int Wai = 3;

void setup() {
  Serial.begin(19200);
  DDRB |= 0x0F;  // Set bits 0 through 3 to OUTPUT
  DDRC |= 0x0F;  // Set bits 0 through 3 to OUTPUT
}

void loop() {
  int A = Serial.read();  // get ascii value from serial port

  if (A == -1)  // If nothing ready...
    return;

  if (A == 'A') {
    for (int x = 0; x < 5; x++) {
      PORTB = 1;
      delay(Wai);
      PORTB = 3;
      delay(Wai);
      PORTB = 2;
      delay(Wai);
      PORTB = 6;
      delay(Wai);
      PORTB = 4;
      delay(Wai);
      PORTB = 12;
      delay(Wai);
      PORTB = 8;
      delay(Wai);
      PORTB = 9;
      delay(Wai);
    }
    PORTB = 0;
  }

  if (A == 'B') {
    for (int x = 0; x < 5; x++) {
      PORTB = 9;
      delay(Wai);
      PORTB = 8;
      delay(Wai);
      PORTB = 12;
      delay(Wai);
      PORTB = 4;
      delay(Wai);
      PORTB = 6;
      delay(Wai);
      PORTB = 2;
      delay(Wai);
      PORTB = 3;
      delay(Wai);
      PORTB = 1;
      delay(Wai);

    }
    PORTB = 0;
  }

  if (A == 'C') {
    for (int x = 0; x < 5; x++) {
      PORTC = 1;
      delay(Wai);
      PORTC = 3;
      delay(Wai);
      PORTC = 2;
      delay(Wai);
      PORTC = 6;
      delay(Wai);
      PORTC = 4;
      delay(Wai);
      PORTC = 12;
      delay(Wai);
      PORTC = 8;
      delay(Wai);
      PORTC = 9;
      delay(Wai);
    }
    PORTC = 0;
  }

  if (A == 'D') {
    for (int x = 0; x < 5; x++) {
      PORTC = 9;
      delay(Wai);
      PORTC = 8;
      delay(Wai);
      PORTC = 12;
      delay(Wai);
      PORTC = 4;
      delay(Wai);
      PORTC = 6;
      delay(Wai);
      PORTC = 2;
      delay(Wai);
      PORTC = 3;
      delay(Wai);
      PORTC = 1;
      delay(Wai);
    }
    PORTC = 0;
  }
}