Show Posts
Pages: [1] 2
1  Using Arduino / Microcontrollers / Re: Mega Junior,1284 on: April 23, 2013, 09:15:22 am
Hello jbaum,

Reserved for Mega Junior, 1284 SMD.

Untested Schematic and board layouts attached.

The zip file for the SMD version is empty. smiley

Regards,
madhu.
2  Using Arduino / Programming Questions / Re: How to 'flip' a port? on: June 22, 2012, 09:09:16 pm
Mr. Gammon,

Has anyone told you lately that you are a godsend? Well, if not, please let me.

Your flip function performed flawlessly! Thank you ever so much!

Regards,
Madhu.
3  Using Arduino / Programming Questions / Re: How to 'flip' a port? on: June 22, 2012, 07:26:13 pm
Bubulindo,

I am sorry, I do not follow.

Do you want to see how the data port is being used by the library?

Thanks,
Madhu.
4  Using Arduino / Programming Questions / Re: How to 'flip' a port? on: June 22, 2012, 07:18:32 pm
WizenedEE,

Exactly.

Thanks,
Madhu.
5  Using Arduino / Programming Questions / Re: How to 'flip' a port? on: June 22, 2012, 06:44:41 pm
Hello,

Thanks for replying. I realise that there is bit manipulation involved; but I am unsure how to do it.

What I am trying to achieve is to 'turn the port over on its head'.

Let me explain - The library is configured to use PortA.0 for DB0 and my PCB has PortA.7 for DB0. I need guidance with the bit where we change the order.

Thanks,
Madhu.
6  Using Arduino / Programming Questions / How to 'flip' a port? on: June 22, 2012, 06:10:19 pm
Hello,

I am trying to connect a 1284P to a T6963C display using this library: http://code.google.com/p/arduino-t6963c/; I have made changes to the header files so that all the pins pf PORTA drive the data bus and four pins on PORTC - PC2, PC3, PC4 and PC5 drive the control pins.

Here is the edit:

Code:
#if (defined(__AVR_ATmega1280__) || \
     defined(__AVR_ATmega1281__) || \
     defined(__AVR_ATmega2560__) || \
     defined(__AVR_ATmega2561__))      //--- Arduino Mega ---

// data port Arduino Mega
#define GLCD_DATA_PORT PORTL
#define GLCD_DATA_PIN PINL //Arduino Mega Pins 49-42
#define GLCD_DATA_DDR DDRL

// control port Arduino Mega
#define GLCD_CTRL_PORT PORTC
#define GLCD_CTRL_PIN PINC //Arduino Mega Pins 37-34
#define GLCD_CTRL_DDR DDRC

#elif defined(__AVR_ATmega1284P__)

// data port 1284P
#define GLCD_DATA_PORT PORTA
#define GLCD_DATA_PIN PINA //Arduino Pins 2-7
#define GLCD_DATA_DDR DDRA
#define GLCD_DATA_MASK 0xFF

// control port 1284P
#define GLCD_CTRL_PORT PORTC
#define GLCD_CTRL_PIN PINC
#define GLCD_CTRL_DDR DDRC

// control signals 1284P
#define GLCD_WR 2
#define GLCD_RD 3
#define GLCD_CE 4  //Should be able to XNOR this with WR and RD
#define GLCD_CD 5
//#define GLCD_RESET  4  //For some reason my LCD works with this pin resistored to +5
//#define GLCD_FS      5  //Use hardware solution not pin.

#else// data port other Arduino
#define GLCD_DATA_PORT1 PORTD
#define GLCD_DATA_PIN1 PIND //Arduino Pins 2-7
#define GLCD_DATA_DDR1 DDRD
#define GLCD_DATA_SHIFT1 <<2
#define GLCD_DATA_RSHIFT1 >>2
#define GLCD_DATA_MASK1 0xFC

#define GLCD_DATA_PORT2 PORTB
#define GLCD_DATA_PIN2 PINB //Arduino Pins 8,9
#define GLCD_DATA_DDR2 DDRB
#define GLCD_DATA_SHIFT2 >>6
#define GLCD_DATA_RSHIFT2 <<6
#define GLCD_DATA_MASK2 0x03
// control port
#define GLCD_CTRL_PORT PORTC
#define GLCD_CTRL_PIN PINC
#define GLCD_CTRL_DDR DDRC

// control signals
#define GLCD_WR 0
#define GLCD_RD 1
#define GLCD_CE 2  //Should be able to XNOR this with WR and RD
#define GLCD_CD 3
//#define GLCD_RESET  4  //For some reason my LCD works with this pin resistored to +5
//#define GLCD_FS      5  //Use hardware solution not pin.
# endif

What this has done is that PortA.0 goes to DB0, PortA.1 goes to DB1 etc., till PortA.7 to DB7.

In a gross oversight on my part, I designed and fabricated a few PCBs with the inverted connection - i. e., PortA.0 to DB7, PortA.1 to DB6 etc., till PortA.7 to DB0.

Now, to my question: is there a way , for lack of a better word, 'to flip' PortA in code so as to have proper transmission of data?

I am sorry if I have not used the proper terminology.

Thanks,
Madhu.
7  Using Arduino / Microcontrollers / Re: ATmega1284P: SoftwareSerial receive pin on: March 15, 2012, 01:22:43 pm
Hi all,

I am trying to use the Arduino 1.0 IDE's SoftwareSerial library with an ATMEGA1284P; on physical pins 24 and 25 (pins 18 and 19 in pins_arduino.h for the standard variant) and I see that I cannot receive on pin 24(18). However, I can transmit successfully on pin 25(19).

Hi all,

Can anyone help me with this?

Thanks,
Madhu.
8  Using Arduino / Microcontrollers / ATmega1284P: SoftwareSerial receive pin on: March 14, 2012, 09:18:16 am
Hi all,

I am trying to use the Arduino 1.0 IDE's SoftwareSerial library with an ATMEGA1284P; on physical pins 24 and 25 (pins 18 and 19 in pins_arduino.h for the standard variant) and I see that I cannot receive on pin 24(18). However, I can transmit successfully on pin 25(19).

After research, I now understand that I need to use pins that support 'change interrupts' - which pins on the 1284P support that?

By the way, pins 24 and 25 are part of the JTAG port (TCK and TMS respectively).

Thank you all in advance for your help,
Madhu.


EDIT -

After further testing, the SoftSerial receive is not working on any port. I am at a loss to understand what may be causing this.
9  Using Arduino / Microcontrollers / Re: ATmega1284P: End to End using 1.0 IDE on: March 02, 2012, 06:56:27 pm
Hello all,

I uploaded the bootloader according to the instructions; all went fine. However when I try to upload the blink sketch, I get the below error message :

Code:
Binary sketch size: 1188 bytes (of a 130048 byte maximum)
C:\Madhu\arduino-1.0\hardware/tools/avr/bin/avrdude -CC:\Madhu\arduino-1.0\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega1284p -carduino -P\\.\COM4 -b115200 -D -Uflash:w:C:\Users\MADHU_~1\AppData\Local\Temp\build7288213302364854003.tmp\Blink.cpp.hex:i

avrdude: Version 5.11, compiled on Sep  2 2011 at 19:38:36
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "C:\Madhu\arduino-1.0\hardware/tools/avr/etc/avrdude.conf"

         Using Port                    : \\.\COM4
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: Recv:
avrdude: stk500_getsync(): not in sync: resp=0x00

avrdude done.  Thank you.


I can upload fine if I use Arduino as as the ISP.

What gives?

I know that the
Code:
not in sync: resp=0x00
is the most un-helpful error meaage; but I tried the normal troubleshooting :

Swapping the RX and TX line,
Adding a capacitor between DTR and reset

I am at a loss now, Please assist.

thanks,
Madhu.
10  Using Arduino / Displays / Re: v3 dec 2011 GLCD on 1284p with Arduino 1.0 on: February 20, 2012, 10:06:21 pm
Cowasaki,

Well, this aims to be a PS2 Controller interface. The 6 pin pads under the 1284p is the interface connection.

I dont know how successful this shall be; only time will tell.

thanks,
Madhu.
11  Using Arduino / Displays / Re: v3 dec 2011 GLCD on 1284p with Arduino 1.0 on: February 20, 2012, 10:21:34 am
Hi Cowasaki,

Thank you for your input. I am sorry, I do not understand what you mean when you say that the LCD connector is not grounded; please find attached a magnified area of the connector.

Also, there was a slight problem in one of the power rails - I have corrected and attached the same.

Let me know in case I need to make more corrections.

Thanks,
Madhu.

12  Using Arduino / Displays / Re: v3 dec 2011 GLCD on 1284p with Arduino 1.0 on: February 20, 2012, 02:54:23 am
All,

As much as I hate to do this, Please comment and post your suggestions.

thanks,
madhu.
13  Using Arduino / Displays / Re: v3 dec 2011 GLCD on 1284p with Arduino 1.0 on: February 17, 2012, 06:40:00 am
Hello all,

In my zeal to use the 1284P with a "type B" GLCD (JHD12864E), I have made this board.

Can anyone please review this and comment / suggest changes?

However, please note, because of size constraints, the PCB can be only 4"(W) x 3"(H).

Thanks,
Madhu.
14  Using Arduino / Programming Questions / Extremely Fast Line Algorithm on: December 05, 2011, 01:34:32 am
Hello all,

I am sure that this would have come up in any discussion related to GLCDs; however, I just thought this post would be easy to access for someone who is a newbie like myself.

While searching for a faster way to draw lines ( and erase them) on a 240 x 128 GLCD driven by a T6963 controller, I came across this : http://www.edepot.com/algorithm.html (EFLA).

Using the inbuilt functions in this library : http://code.google.com/p/arduino-t6963c/, I was able to achieve just 13 to 14 FPS when running the attached code. However, after 'upgrading' to the EFLA, the FPS bumped up to 23 - 24FPS for drawing and erasing; and about 40 to 41FPS for drawing alone.

Now, I am not sure how to submit a 'feature - request' to the developer of the T6963 library, but I sure hope he sees this.

Thank you,

Madhu.

/* edit :  Had uploaded the wrong code; corrected the mistake. */
15  Using Arduino / Programming Questions / Re: Draw and Erase on: December 02, 2011, 05:51:27 pm
Hello all,

Here is an update to the below:

Quote
This works! However, it seems to think 0 degrees is pointing bottom rather than on top. I shall post again after I see what I have
done.

I changed the following from robtillaart's code posting:

Code:
  x0 = x_ref - (int)(cx_x0 * costh - cy_y0 * sinth);
  y0 = y_ref - (int)(cx_x0 * sinth + cy_y0 * costh);
  x1 = x_ref - (int)(cx_x1 * costh - cy_y1 * sinth);
  y1 = y_ref - (int)(cx_x1 * sinth + cy_y1 * costh);
  x2 = x_ref - (int)(cx_x2 * costh - cy_y2 * sinth);
  y2 = y_ref - (int)(cx_x2 * sinth + cy_y2 * costh);
  x3 = x_ref - (int)(cx_x3 * costh - cy_y3 * sinth);
  y3 = y_ref - (int)(cx_x3 * sinth + cy_y3 * costh);


To...

Code:
  x0 = x_ref - (int)(cx_x0 * costh) - (int)(cy_y0 * sinth);
  y0 = y_ref - (int)(cx_x0 * sinth) + (int)(cy_y0 * costh);
 
  x1 = x_ref - (int)(cx_x1 * costh) - (int)(cy_y1 * sinth);
  y1 = y_ref - (int)(cx_x1 * sinth) + (int)(cy_y1 * costh);
 
  x2 = x_ref - (int)(cx_x2 * costh) - (int)(cy_y2 * sinth);
  y2 = y_ref - (int)(cx_x2 * sinth) + (int)(cy_y2 * costh);
 
  x3 = x_ref - (int)(cx_x3 * costh) - (int)(cy_y3 * sinth);
  y3 = y_ref - (int)(cx_x3 * sinth) + (int)(cy_y3 * costh);

Now the arrow seems to be pointing in the right direction. Can anyone please help me understand the difference between the two pieces of code?

Thanks in advance,

Madhu.

Pages: [1] 2