Go Down

Topic: Project Bambino (Read 6414 times) previous topic - next topic

janost

#45
Dec 12, 2013, 11:06 am Last Edit: Dec 12, 2013, 11:10 am by janost Reason: 1
Ok, found the problem:


If you use the normal upload button, the Arudino IDE (1.0.5) issues an AVRDUDE command with the -D flag. The -D flag blocks the normal AVRDUDE chip erase operation.


I have to use the "Upload using programmer" in the file menu to perform a chip erase.
But if I use that I only get some Java error that I dont understand.

I'll stick with a separate chip erase before upload.

If I mod the IDE, chances are I will accidently erase the bootloader on one of my Uno's or Nano's


janost

It now has a multipurpose PS/2 connector that takes a keyboard or mouse.
But its also a 4 digital I/O with Vcc/Gnd for any interfacing.

And from before, a 3.5mm plug for video and audio.


janost

The A and C ports are still untouched.

janost

This is the prototype board  and it's working over expectations.
I dont know how to be able to do a circuitboard for this one?

But I'm going to.
I want anyone to be able to put together a retro color computer/arcade.

strykeroz

Looking good.  There are plenty of options for manufacturing PCBs in small runs.  I have only used Seeed Studios for which there are design rules for EagleCAD.  Others use Eagle or Kicad largely.  Have you done the schematic up in either of those?

Geoff
"There is no problem so bad you can't make it worse"
- retired astronaut Chris Hadfield

tack

Good to see someome else playing with the 1284's, especially with what you have in mind and having seen your VideoBlaster work.

I am using 1284's on custom made PCB's, with Arduino IDE and USBASP for uploading via ICSP. It all works flawlessly once you have the cores in the right place. I'm using the maniacbug cores with the Bobuino pin mapping. Bobuino puts pin numbers as close to the same as the Uno as you can get.

If you are going to get some PCB's made then I can recommend Elecrow. I'vebused them numerous times now and never been dissapointed at cost, speed or quality. 10 off 100m x 100mm boards are around $30.

I'm looking forward to seeing what you manage to get out of the 1284.

janost


Looking good.  There are plenty of options for manufacturing PCBs in small runs.  I have only used Seeed Studios for which there are design rules for EagleCAD.  Others use Eagle or Kicad largely.  Have you done the schematic up in either of those?

Geoff


The schematics is done in ExpressSCH and the board in ExpressPCB.
But their PCB sevices are way to expensive.

The board isnt that complicated.
Its just lines between the 1284 and the connectors.

janost

#52
Dec 21, 2013, 12:57 pm Last Edit: Dec 21, 2013, 01:38 pm by janost Reason: 1
Here is the board schematic as it is now.

The LED is the Arduino LED13 and in my case DigitalPin0.
It is also the pixelclock output on the VideoBlaster.


janost

EmbedVM, Virtual Machine for microcontrollers looks perfect for my Bambino board.
It compiles both C and Python to embedVM bytecode running on AVR SRAM or EEPROM (or even on an SD-card)

If I can get the compiler running onboard?

http://www.clifford.at/embedvm/

strykeroz

Where does it draw power from?
"There is no problem so bad you can't make it worse"
- retired astronaut Chris Hadfield

janost


Where does it draw power from?


For now I just feed +5v and Gnd from a cutoff USB-Cable and feed it to respective pins.
This is because I have not yet implemented the powerconnector nor have a USB connector onboard.

The programmer does not feed power to the ICSP connector, just monitors it.

janost

It should also be possible to write a bytecode VM into flash that runs actual AVR assembler from SRAM or EEPROM.
That could be very fast and I could write programs using AVRASM?

And write an onboard AVR assembler or compiler?

janost


I'm using the maniacbug cores with the Bobuino pin mapping. Bobuino puts pin numbers as close to the same as the Uno as you can get.


I'm using the Standard pinmapping at the moment but might change it to Bobuino to match the UNO board.

Code: [Select]

//                       +---\/---+
//           (D 0) PB0  1|        |40  PA0 (AI 0 / D24)
//           (D 1) PB1  2|        |39  PA1 (AI 1 / D25)
//      INT2 (D 2) PB2  3|        |38  PA2 (AI 2 / D26)
//       PWM (D 3) PB3  4|        |37  PA3 (AI 3 / D27)
//    PWM/SS (D 4) PB4  5|        |36  PA4 (AI 4 / D28)
//      MOSI (D 5) PB5  6|        |35  PA5 (AI 5 / D29)
//  PWM/MISO (D 6) PB6  7|        |34  PA6 (AI 6 / D30)
//   PWM/SCK (D 7) PB7  8|        |33  PA7 (AI 7 / D31)
//                 RST  9|        |32  AREF
//                 VCC 10|        |31  GND
//                 GND 11|        |30  AVCC
//               XTAL2 12|        |29  PC7 (D 23)
//               XTAL1 13|        |28  PC6 (D 22)
//      RX0 (D 8)  PD0 14|        |27  PC5 (D 21) TDI
//      TX0 (D 9)  PD1 15|        |26  PC4 (D 20) TDO
// RX1/INT0 (D 10) PD2 16|        |25  PC3 (D 19) TMS
// TX1/INT1 (D 11) PD3 17|        |24  PC2 (D 18) TCK
//      PWM (D 12) PD4 18|        |23  PC1 (D 17) SDA
//      PWM (D 13) PD5 19|        |22  PC0 (D 16) SCL
//      PWM (D 14) PD6 20|        |21  PD7 (D 15) PWM
//                       +--------+
//

janost

I stole most of the PS2keyboard library to make my chrin routine.

Code: [Select]

char chrin() {
byte result=0;
byte realkey=0;
if (UCSR1A&128) {
  result=UDR1;

    switch (result) {
    case 0xF0: { // key release char
      ps2Keyboard_release = true;
      ps2Keyboard_extend = false;
      result=0;
      break;
    }
    case 0xFA: { // command acknowlegde byte
     
      break;
    }
    case 0xE0: { // extended char set
      ps2Keyboard_extend = true;
      break;
    }
    case 0x12:   // left shift
    case 0x59: { // right shift
      ps2Keyboard_shift = ps2Keyboard_release? false : true;
      ps2Keyboard_release = false;
      result=0;
      break;
    }
    case 0x11: { // alt key (right alt is extended 0x11)
      ps2Keyboard_alt = ps2Keyboard_release? false : true;
      ps2Keyboard_release = false;
      result=0;
      break;
    }
    case 0x14: { // ctrl key (right ctrl is extended 0x14)
      ps2Keyboard_ctrl = ps2Keyboard_release? false : true;
      ps2Keyboard_release = false;
      break;
    }
    case 0x58: { // caps lock key
      if (!ps2Keyboard_release) {
ps2Keyboard_caps_lock = ps2Keyboard_caps_lock? false : true;
      }
      else {
ps2Keyboard_release = false;
      }
      result=0;
      break;
    }
    default: { // a real key
      if (ps2Keyboard_release) { // although ignore if its just released
        ps2Keyboard_release = false;
        result=0;
      }
      else { // real keys go into CharBuffer
        realkey=result;
      }
    }
    }

switch (result) {

  case 0x1C: result = 'a'; break;
  case 0x32: result = 'b'; break;
  case 0x21: result = 'c'; break;
  case 0x23: result = 'd'; break;
  case 0x24: result = 'e'; break;
  case 0x2B: result = 'f'; break;
  case 0x34: result = 'g'; break;
  case 0x33: result = 'h'; break;
  case 0x43: result = 'i'; break;
  case 0x3B: result = 'j'; break;
  case 0x42: result = 'k'; break;
  case 0x4B: result = 'l'; break;
  case 0x3A: result = 'm'; break;
  case 0x31: result = 'n'; break;
  case 0x44: result = 'o'; break;
  case 0x4D: result = 'p'; break;
  case 0x15: result = 'q'; break;
  case 0x2D: result = 'r'; break;
  case 0x1B: result = 's'; break;
  case 0x2C: result = 't'; break;
  case 0x3C: result = 'u'; break;
  case 0x2A: result = 'v'; break;
  case 0x1D: result = 'w'; break;
  case 0x22: result = 'x'; break;
  case 0x35: result = 'y'; break;
  case 0x1A: result = 'z'; break;

    // note that caps lock only used on a-z
  case 0x41: result = ps2Keyboard_shift? ';' : ','; break;
  case 0x49: result = ps2Keyboard_shift? ':' : '.'; break;
  case 0x4A: result = ps2Keyboard_shift? '?' : '/'; break;
  case 0x54: result = ps2Keyboard_shift? '{' : '['; break;
  case 0x5B: result = ps2Keyboard_shift? '}' : ']'; break;
  case 0x4E: result = ps2Keyboard_shift? '_' : '-'; break;
  case 0x55: result = ps2Keyboard_shift? '+' : '='; break;
  case 0x29: result = ' '; break;

  case 0x45: result = ps2Keyboard_shift? '=' : '0'; break;
  case 0x16: result = ps2Keyboard_shift? '!' : '1'; break;
  case 0x1E: result = ps2Keyboard_shift? 0x22 : '2'; break;
  case 0x26: result = ps2Keyboard_shift? '#' : '3'; break;
  case 0x25: result = ps2Keyboard_shift? '$' : '4'; break;
  case 0x2E: result = ps2Keyboard_shift? '%' : '5'; break;
  case 0x36: result = ps2Keyboard_shift? '&' : '6'; break;
  case 0x3D: result = ps2Keyboard_shift? '/' : '7'; break;
  case 0x3E: result = ps2Keyboard_shift? '(' : '8'; break;
  case 0x46: result = ps2Keyboard_shift? ')' : '9'; break;

  case 0x0D: result = '\t'; break;
  case 0x5A: result = 13; break;
  case 0x66: result = PS2_KC_BKSP;  break;
  case 0x69: result = ps2Keyboard_extend? PS2_KC_END   : '1'; break;
  case 0x6B: result = ps2Keyboard_extend? PS2_KC_LEFT  : '4'; break;
  case 0x6C: result = ps2Keyboard_extend? PS2_KC_HOME  : '7'; break;
  case 0x70: result = ps2Keyboard_extend? PS2_KC_INS   : '0'; break;
  case 0x71: result = ps2Keyboard_extend? PS2_KC_DEL   : '.'; break;
  case 0x72: result = ps2Keyboard_extend? PS2_KC_DOWN  : '2'; break;
  case 0x73: result = '5'; break;
  case 0x74: result = ps2Keyboard_extend? PS2_KC_RIGHT : '6'; break;
  case 0x75: result = ps2Keyboard_extend? PS2_KC_UP    : '8'; break;
  case 0x76: result = PS2_KC_ESC; break;
  case 0x79: result = '+'; break;
  case 0x7A: result = ps2Keyboard_extend? PS2_KC_PGDN  : '3'; break;
  case 0x7B: result = '-'; break;
  case 0x7C: result = '*'; break;
  case 0x7D: result = ps2Keyboard_extend? PS2_KC_PGUP  : '9'; break;

  } // end switch(result)
}
   if (((result>='a') && (result<='z')) &&
      ((ps2Keyboard_shift && !ps2Keyboard_caps_lock) ||
       (!ps2Keyboard_shift && ps2Keyboard_caps_lock))) {
    result = result + ('A'-'a');
   }

  return result;
}

strykeroz


For now I just feed +5v and Gnd from a cutoff USB-Cable and feed it to respective pins.
This is because I have not yet implemented the powerconnector nor have a USB connector onboard.

The programmer does not feed power to the ICSP connector, just monitors it.
All good. The reason for asking is that wasn't in your schematic.  The whole board will be very compact by the looks.  Might even fit in a 50x50mm form factor depending on the footprint of the required connectors.

Cheers ! Geoff
"There is no problem so bad you can't make it worse"
- retired astronaut Chris Hadfield

Go Up