Ps2 controller data transfer using bluetooth module hc-05

Go To Last Post
26 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello, i am working on a project to make a wireless ps2 controller and transfer data to atmega2560 board.

I have a wired ps2 controller i want to modify it and add a bluetooth module to it and trasfer data. As ps2 controller uses spi protocol to communicate is it possible to do the communication using bluetooth module hc-05?

What all modifications will be required will be required?

Like by removing the wired communication to which pins should i connect my bluetooth module tx and rx?

And how do i read the data at recieving end that is atmega2560.

I am not using any extra microcontroller only the pins of controller inside ps2 controller are to be used.

Thanks in advance.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

 

This is not going to work the way you want it to. But don't worry: All you need to make it work is a small micro controller between the PS2 controller's pins and the HC-05's pins.

The reason is that the Bluetooth module "speaks" UART and the controller speaks SPI. The conversion should not be that difficult however,  and this also has the advantage that you can define the protocol for the receiving end or leave it as it is and just pass the bytes through.

 

Maybe have a look at this http://store.curiousinventor.com...

 

Cheers

-Patrick

"Some people die at 25 and aren't buried until 75." -Benjamin Franklin

 

What is life's greatest illusion?"  "Innocence, my brother." -Skyrim

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you for your help but hc-05 has spi pins like miso mosi clk can't we use it for spi communication protocol?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I googled a little and it seems to me that the HC-05's SPI pins can only be used to program the module. It can't even be controlled over SPI, only UART.

The module's hardware however might be capable of doing what you want, but the SDK is not free.

So unless you want to pay a lot and learn how to program a Bluetooth SoC, you better just buy another (small) Arduino and put it into the controller.

What might be an option here is to buy an aftermarket wireless controller for the PS2. It's interface is exactly the same as the wired one, minus the cable: http://www.ebay.com/itm/18238961...

"Some people die at 25 and aren't buried until 75." -Benjamin Franklin

 

What is life's greatest illusion?"  "Innocence, my brother." -Skyrim

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So how do i code the micro controller?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sorabh wrote:
So how do i code the micro controller?

 

I googled "arduino playstation controller" and found this:

http://www.techmonkeybusiness.co...

 

Jim

 

(Possum Lodge oath) Quando omni flunkus, moritati.

"I thought growing old would take longer"

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This is for arduino i have atmega2560 and want to code using atmel studio 7.
Is there any code for that?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What do you think an Arduino Mega has for an MPU? 

AS7 has an Arduino script importing tool.

 

Jim

 

 

(Possum Lodge oath) Quando omni flunkus, moritati.

"I thought growing old would take longer"

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Here is some code for handling a PS2 keyboard (this is the old kind of keyboard with the purple mini-DIN6 connector).  It has two signal pins: CLOCK and DATA.  However the protocol is not exactly either USART or SPI.    Each falling edge on the PS2 clock pin triggers a Pin-Change interrupt.  When the PS2 byte has been completely assembled (after 11 or so interrupts), the byte is parsed into a PS2 keyboard message according to whether the key is pressed or released, or if it is a key with an extended scan code.   The scan codes are then converted into ASCII or a MIDI NOTE ON/OFF message (if the PS2 keyboard is being used as a MIDI piano keyboard).

  
  //  include these lines in setup()
   pinMode(PS2_CLOCK, INPUT_PULLUP);     
   pinMode(PS2_DATA,  INPUT_PULLUP); 
   pinMode(MY_PCINT22, INPUT_PULLUP);
   pinMode(MY_PCINT23, INPUT_PULLUP);
   
   // initialize interrupt vectors for Pin_Change inputs: 
// uses volatile bool isPinChg22Active = false, isPinChg23Active = false;
// 10.2.4 pin-change interrupt control register/
   PCMSK2 = (1<<PCINT23) | (1<<PCINT22); // set to enable IRQ on pin change  [10.2.6 AVR's PD6:PD7
   PCICR  = (1<< PCIE2); // PCIE2> 1=PCI23:16  bank 2, PCIE1=1>PCI15:8 bank 1, PCIE0 1=PCI7:0 Arduino D6:D7

   
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//  Interrupt routine for PS2 clock pin going low
ISR(PCINT2_vect) {  // two active pins: MY_PCINT23=D7  MY_PCINT22=D6
    delay(20);     // pin debounce
    if ( digitalRead( MY_PCINT22) == LOW ) currentPinChg22State  = true;
    else currentPinChg22State  = false;   // PCINT22=Arduino D6::PORTD6
    if ( digitalRead( MY_PCINT23) == LOW ) currentPinChg23State  = true;
    else currentPinChg23State  = false;   // PCINT23=Arduino D7::PORTD7
 } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 //
//          PS2 KEYBOARD
 //
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

const uint8_t PROGMEM ASCIItable[]  = { // ASCII values that correspond to the PC keyboard's transmitted scancode
  // 0     1     2     3     4     5     6     7     8     9     a     b     c     d     e     f
  0xff, 0x88, 0xff, 0x84, 0x82, 0x80, 0x81, 0x8b, 0xff, 0x89, 0x87, 0x85, 0x83, 0x09, 0x60, 0xff,  //  00-0f
  0xff, 0xff, 0xff, 0xff, 0xff, 0x71, 0x31, 0xff, 0xff, 0xff, 0x7a, 0x73, 0x61, 0x77, 0x32, 0xff,  //  10-1f
  0xff, 0x63, 0x78, 0x64, 0x65, 0x34, 0x33, 0xff, 0xff, 0x20, 0x76, 0x66, 0x74, 0x72, 0x35, 0xff,  //  20-2f
  0xff, 0x6e, 0x62, 0x68, 0x67, 0x79, 0x36, 0xff, 0xff, 0xff, 0x6d, 0x6a, 0x75, 0x37, 0x38, 0xff,  //  30-3f
  0xff, 0x2c, 0x6b, 0x69, 0x6f, 0x30, 0x39, 0xff, 0xff, 0x2e, 0x2f, 0x6c, 0x3b, 0x70, 0x2d, 0xff,  //  40-4f
  0xff, 0xff, 0x27, 0xff, 0x5b, 0x3d, 0xff, 0xff, 0xff, 0xff, 0x0d, 0x5d, 0xff, 0x5c, 0xff, 0xff,  //  50-5f
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x08, 0xff, 0xff, 0x31, 0xff, 0x34, 0x37, 0xff, 0xff, 0xff,  //  60-6f
  0x30, 0xff, 0x32, 0x35, 0x36, 0x38, 0x1b, 0xff, 0x8a, 0xff, 0x33, 0xff, 0xff, 0x39, 0xff, 0xff}; //  70-7f  76=ESC

 const uint8_t PROGMEM shiftTable[] =  { // Shifted ASCII values that correspond to transmitted scancode. Not bit5 different
//   0     1     2     3      4     5     6     7     8     9     a     b     c     d     e     f :  follows: 33 total
  0xff, 0x88, 0xff, 0x84,  0x82, 0x80, 0x81, 0x8b, 0xff, 0x89, 0x87, 0x85, 0x83, 0x09, 0x7e, 0xff,  // 00-0f 0d,0e
  0xff, 0xff, 0xff, 0xff,  0xff, 0x51, 0x21, 0xff, 0xff, 0xff, 0x5a, 0x53, 0x41, 0x57, 0x40, 0xff,  // 10-1f 16,1e
  0xff, 0x43, 0x58, 0x44,  0x45, 0x24, 0x23, 0xff, 0xff, 0x20, 0x56, 0x46, 0x54, 0x52, 0x25, 0xff,  // 20-2f 25,26,29,2e
  0xff, 0x4e, 0x42, 0x48,  0x47, 0x59, 0x5e, 0xff, 0xff, 0xff, 0x4d, 0x4a, 0x55, 0x26, 0x2a, 0xff,  // 30-3f 36,3d,3e
  0xff, 0x3c, 0x4b, 0x49,  0x4f, 0x29, 0x28, 0xff, 0xff, 0x3e, 0x3f, 0x4c, 0x3a, 0x50, 0x5f, 0xff,  // 40-4f 41,45,46,49,4a,4c,4e
  0xff, 0xff, 0x22, 0xff,  0x7b, 0x2b, 0xff, 0xff, 0xff, 0xff, 0x0d, 0x7d, 0xff, 0x7c, 0xff, 0xff,  // 50-5f 52,55,5a
  0xff, 0xff, 0xff, 0xff,  0xff, 0xff, 0x08, 0xff, 0xff, 0x31, 0xff, 0x34, 0x37, 0xff, 0xff, 0xff,  // 60-6f 66,69,6b,6c
  0x30, 0xff, 0x32, 0x35,  0x36, 0x38, 0x1b, 0xff, 0x8a, 0xff, 0x33, 0xff, 0xff, 0x39, 0xff, 0xff}; // 70-7f 70,72,73,74,75,76,7a,7d

// 2nd scan code when first scan code is 0xE0.  add 0x10 to matched offset for sub-ASCII-space value
const uint8_t PROGMEM extendedTable[]  =
// 90    91    92    93    94    95    96    97    98    99    9a    9b    9c    9d <===- above-ASCIIvalue returned
{0x75, 0x72, 0x6b, 0x74, 0x11, 0x14, 0x70, 0x6c, 0x71, 0x69, 0x7d, 0x7a, 0x5a, 0x4a, 0}; // 0x90-0x9d
//  \_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____  down arrow
//        \_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____  up arrow
//              \_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____  left  arrow
//                    \_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____  right arrow
//                          \_____|_____|_____|_____|_____|_____|_____|_____|_____|_____  right Alt key
//                                \_____|_____|_____|_____|_____|_____|_____|_____|_____  right Control key
//                                      \_____|_____|_____|_____|_____|_____|_____|_____  Insert key
//                                            \_____|_____|_____|_____|_____|_____|_____  Home key
//                                                  \_____|_____|_____|_____|_____|_____  Delete key
//   scancode keypress state                              \_____|_____|_____|_____|_____  End key
//   1: 14               normal key down                        \_____|_____|_____|_____  PageUp key
//   2: E0  3: 14        extended key down                            \_____|_____|_____  PageDown key
//   4: F0  5: 14        normal key release                                 \_____|_____  KeyPad Enter key
//   6: F0  7: E0  8: 14 extended key release                                     \_____  KeyPad divide


// PS2 keyboard plays MIDI notes  top two rows are low octave; bottom two rows are high octaves
// offset 0x86 is Fn7 [only key that is out of 0-127 ScanTable range]
uint8_t MIDIScanTable[] = {
//   0     1     2     3     4     5     6     7     8     9     a     b     c     d     e     f
  0xff, 0x88, 0xff, 0x84, 0x82, 0x80, 0x81, 0x8b, 0xff, 0x89, 0x87, 0x85, 0x83,    1,    0, 0xff,  // 00-0f 0x8n are function keys F1 to F12
  0xff, 0xff,   25, 0xff, 0xff,    2, 0xff, 0xff, 0xff, 0xff,   26,   27,   24,    4,    3, 0xff,  // 10-1f
  0xff,   30,   28,   29,    6, 0xff,    5, 0xff, 0xff, 0xc0,   31, 0xff,    9,    7,    8, 0xff,  // 20-2f  Spacebar=29 (C0)
  0xff,   35,   33,   34,   32,   11,   10, 0xff, 0xff, 0xff,   37,   36,   13,   12, 0xff, 0xff,  // 30-3f
  0xff,   38, 0xff,   14,   16,   17,   15, 0xff, 0xff,   40,   42,   39,   41,   18, 0xff, 0xff,  // 40-4f
  0xff, 0xff,   44, 0xff,   19,   20, 0xff, 0xc1, 0xff,   43,   45,   21, 0xff,   23, 0xff, 0xff,  // 50-5f  CapsL=58 (C1)
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,   22, 0xff, 0xff, 0x41, 0xff, 0x44, 0x47, 0xff, 0xff, 0xff,  // 60-6f
  0x40, 0x4e, 0x42, 0x45, 0x46, 0x48, 0xC2, 0x4a, 0x8a, 0x4d, 0x43, 0x4c, 0x4b, 0x49, 0xff, 0xff}; // 70-7f
// ESC=76 (C2)  71=KP_dot   77=NumLock  79=KP+  7b=KP-   7c=KB*   0x4n are now keypad  digits
// 2nd scan code when first scan code is 0xE0.  add 0x10 to matched offset for sub-ASCII-space value


#define  BACKSPACE_KEY          8  //  scancode:0x66
#define  ENTER_KEY             13  //  scancode:0x5a
#define  CONTROL_SCANCODE    0x14
#define  RightSHIFT_SCANCODE 0x59
#define  LeftSHIFT_SCANCODE  0x12
#define  ALT_SCANCODE        0x11
#define  IGNORE_SCANCODE     0xff
#define  BREAK_SCANCODE      0xf0
#define  EXTENDED_SCANCODE   0xe0

// global variables for PS2 keyboard
volatile bool     is_KeyPress_Break     = false;  // true: first byte of key release [0xf0] has been received
volatile bool     is_KeyPress_Extended  = false;  // true: extended key scancode [0xe0] has been received
volatile bool     is_ShiftKey_Pressed   = false;  // true: left or right Shift key being pressed
volatile bool     is_ControlKey_Pressed = false;  // true: left or right Control key being pressed
volatile bool     is_AltKey_Pressed     = false;  // true: Alt key being pressed
volatile bool     isNewPS2DataReady     = false;
volatile uint8_t  PS2clockCount         = 11;
volatile uint8_t  scanCode;
char              keyPress;     // function codes:0x00-0x0b  extended keys:0x10-01d   printable ASCII:0x20-0x7f


/*=======================================================================
  keyParse  Determine newest scancode's state from previous
            PS2 flags (boolean global variable settings).


  send: scancode from PS2receive ISR
  called by:

  PS2 flags - global updates:    scancode keypress state map:
     is_keypress_Extended        1:14             normal key down
     is_ShiftKey_Pressed         2:E0  3:14       extended key down
     is_ControlKey_Pressed       4:F0  5:14       normal key release
     is_AltKey_Pressed           6:F0  7:E0  8:14 extended key release
     is_keypress_Break


  returns:   0xff       ignore scancode  Scancode's state is not 1 or 3.
             0x00-0x1f  CNTRL + alphabet
             0x20-0x7f  ASCII
             0x80-0x8b  Function keys :  F1, F2, ... F12
             0x90-0x9d  Arrow and Edit keys [extended scancodes]
             0xa0-0xff  ALT + alphanumeric

*************************************************************************/
uint8_t  keyParse(uint8_t myScanCode) {
  bool    found = false;
  uint8_t i;

  if (myScanCode == 0x83) {   // function 7 pressed.  This is the only
    return ( 0x96);           // scancode greater than 128. This puts it
  }                           // outside the ASCII and Shift table ranges.

  if (is_keypress_Break == true) {       // keyParseValue States: 5, 7, or 8
    is_keypress_Break = false;           //
                                         // key release  test for:
    switch (myScanCode) {                //  CNTRL,SHIFT, or ALT   bool
      case   ALT_SCANCODE :              //  Extended scancode     0xE0
        is_AltKey_Pressed = false;       //  Extended flag         bool
        break;                           //
                                         //
      case   CONTROL_SCANCODE :          //
        is_ControlKey_Pressed = false;   //
        break;                           //
                                         //
      case   RightSHIFT_SCANCODE :       //
        is_ShiftKey_Pressed = false;     //
        break;                           //

      case   LeftSHIFT_SCANCODE :
        is_ShiftKey_Pressed = false;
        break;

      case  EXTENDED_SCANCODE  :     // keyParseValue State: 7
        is_keypress_Extended = true;
        break;

      default:
        if (  is_keypress_Extended == true ) is_keypress_Extended = false;  // keyParseValue State: 8
        // ASCII key decoding doesn't do anything when a key is released.   // keyParseValue State: 5
        break;

    }  // end of switch

    return (IGNORE_SCANCODE);
  }    // if break_flag is set.  [a key was released]

  else   // break flag is clear.  Scancode state: 1, 2, 3, 4 or 6
  {
    switch (myScanCode)  {
        case   BREAK_SCANCODE :      // Scancode state:  4 or 6    scancode keypress state map:
          is_keypress_Break = true;  //                            1:14             normal key down
          return (IGNORE_SCANCODE);  //                            2:E0  3:14       extended key down
          break;                     //                            4:F0  5:14       normal key release
                                     //                            6:F0  7:E0  8:14 extended key release
        case   EXTENDED_SCANCODE :   // Scancode state:  2
          is_keypress_Extended = true;
          return (IGNORE_SCANCODE);
          break;

        case   ALT_SCANCODE :
          is_AltKey_Pressed = false;
          return (IGNORE_SCANCODE);
          break;

        case   CONTROL_SCANCODE :
          is_ControlKey_Pressed = true;
          return (IGNORE_SCANCODE);
          break;

        case   RightSHIFT_SCANCODE :
          is_ShiftKey_Pressed = true;
          return (IGNORE_SCANCODE);
          break;

        case   LeftSHIFT_SCANCODE :
          is_ShiftKey_Pressed = true;
          return (IGNORE_SCANCODE);
          break;

        default:   // Key-parsing returns valid value on keypress down for scancode states: 1 or 3.
          if ( is_ControlKey_Pressed == true) return( ((pgm_read_byte(&(ASCIItable[myScanCode])))-0x60) & 0x1f);
          if ( is_ShiftKey_Pressed   == true) return(   pgm_read_byte(&(shiftTable[myScanCode])));
          if ( is_AltKey_Pressed     == true) return( ( pgm_read_byte(&(ASCIItable[myScanCode]))-0x20) + 0xa0);
          if ( is_keypress_Extended  == true) {        //  scancode state: 3
             for (i = 0; extendedTable[i] == 0; i++) {
               if ( extendedTable[i] == myScanCode) {
                 found = true;
                 break;
               }
             }
             if (found == true) return (0x90 + i);
             else return (IGNORE_SCANCODE);
          }
          return( pgm_read_byte(&(ASCIItable[myScanCode])));
          break;
    }  // end of switch
  } // break is clear
}  // ~~~~~~~~ end of keyParse()


/*=======================================================
    Interrupt Service Routine for INT0

  setup() line:  attachInterrupt(INT0, PS2receive, RISING);  // PS2 clock

        Each keypress sends one to three byte-messages
    from the PS2 keyboard.  Each byte-message has
    a start bit, 8 data bits, a parity and a stop
    bit [11 total].
      PS2 clock and data lines are usually logic high:
    +5V (not 3.3v)  PS2 data and clock come from the
    keyboard.  Data is valid on rising edge of clock.

     Initialize with a volatile global counter variable
    valued 11.

    updates: volatile bool    isNewPS2DataReady
             volatile uint8_t scancode, PS2clockCount

***********************************************************/
void PS2receive() {
  switch (PS2clockCount) {
    case 11 :
      PS2clockCount -= 1;    // ignore START  bit
      break;
    case 2 :                 // ignore parity bit
      PS2clockCount -= 1;
      break;
    case 1 :                 // ignore STOP bit, re-init
      PS2clockCount = 11;
      isNewPS2DataReady = true;
      break;
    default :
      scanCode >>= 1;
      if (digitalRead(PS2_DATA) == HIGH ) scanCode |= 0x80;
      PS2clockCount -= 1;
      break;
  }
}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//  end of PS2 keyboard routines and variables
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

I have no idea of what this is and why it appeared when I clicked on the button to upload my message with included source code.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think the 'ps2' in this instance is 'playstation 2'

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

But i want to code a customised board and not with a arduino Code but with normal C code as we do for other micro controller in AS7.

It is a task assigned to me.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Convert the 'Arduino' code then - most of it is probably normal C code anyways - you do realise all Arduino code is just C/C++ and a handful of standard libraries. For the most part you want to understand the method used rather than the specific code.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So like i should understand the library of arduino for ps2 and write a code for my controller?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That is one method. You could always hook a logic analyser up to a playstation 2 and a controller and reverse engineer the protocol yourself and then write code to do this. How much effort do you want to apply?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I would prefer if there is a library for AS7 for 2560 controller so that ican understand that directly and then write a code including the library.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

How does that differ from using Arduino? Its the same thing whatever color you paint it.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There's a lot of PS2 projects also the protocol and the pulse reading in the net.
How hard to google it instead asking for the library here?
From that you can manage to make your own library.
You can use NRF2401 or RFM12B for that. Why chose bluetooth? You don't need very secure connection for the controller right?
.
MG

I don't know why I'm still doing this hobby

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sorabh wrote:

It is a task assigned to me.

 

By whom? This matters because if this for school or work, you should be cautious not to violate any licenses if you use libraries. If you have enough time you better just do it yourself, it's not that difficult.

 

"Some people die at 25 and aren't buried until 75." -Benjamin Franklin

 

What is life's greatest illusion?"  "Innocence, my brother." -Skyrim

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have got this task from my college where i have to connect wired ps2 controller to customised atmega 2560 board(by nex robotics) and on different led depending on data recieved.

Is it possible to convert arduino sketch to project by selecting create project fom arduino sketch option?
Please help me with this also as i have arduino code ready but want to program customised board.

Thank you

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Why can't you put the arduino code on your board?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

How do i do that this is my board

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'd get the hex file generated by the Arduino app and burn it onto your board.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Will that work on a customised board with ps2 library for arduino included and code both. I dont have a idea on that so should i just generate hex file by compiling arduino sketch and then using usb asap programmer and sinaprog app i shpuld burn code onto my board?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

One more doubt while i was doing serial communication between arduino mega and my customised board i got a lag of 4 sec. Will i get the lag if burn hex file build on arduino ide on my customised board and communicate with other board?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

rather than asking questions, why not actually TRY something and do some independent research. 

There's so much written about the Arduino what you stopped to consider that many other people might have just wanted to do much the same as yourself?

First question - what is the difference between an Arduino mega board and your 'custom' board? Some things to consider might be the crystal and  frequency. If these are different to the mega board, then you can alter the Arduino boards.txt file to correct this difference. Other differences might be pins things are connected to - a bit of research should enable you to figure out how this might be resolved. Arduino has its own pin numbering system, so you'll have to resolve this. All you need to do is compare the two schematics and Google the Arduino pin mapping table. Everything else just involves some thinking and a pen and paper.

 

Also, if you have a look on the forum, there are recent discussions on compiling Arduino projects in Atmel Studio 7.