Show Posts
Pages: [1] 2
1  Using Arduino / Displays / Re: Help Wiring Adafruit 1.8" TFT LCD and 1284p standalone project [Solved] on: November 13, 2012, 04:36:01 pm
With the new library released in 12 november it's work!

https://github.com/adafruit/Adafruit-ST7735-Library

2  Using Arduino / Displays / Re: Help Wiring Adafruit 1.8" TFT LCD and 1284p standalone project on: November 12, 2012, 04:40:54 pm
This evening I tried to connect the display with arduino one following the tutorial step by step ..... but the result is the same the display appears all white smiley-sad

http://learn.adafruit.com/1-8-tft-display/connecting-the-display


Could it be broken? Mistake or something fundamental? But I followed the tutorial like a monkey: D
3  Using Arduino / Displays / Re: Help Wiring Adafruit 1.8" TFT LCD and 1284p standalone project on: November 12, 2012, 07:10:09 am
I have  tried to post the same message to adafruti forum

http://forums.adafruit.com/viewtopic.php?f=47&t=34244

But at this time I have no news smiley-sad

4  Using Arduino / Displays / Re: Help Wiring Adafruit 1.8" TFT LCD and 1284p standalone project on: November 11, 2012, 11:25:04 am
@MarkT

I have also tried with non-highspeed version with the same result.

Code:
Gnd          --> GND
VCC          --> 5v
RESET      --> D0
D/C          --> D3
CARDCS    --> NONE
TFTCS      --> D23
MOSI        --> D22
SCK         --> D21
MISO        --> NONE
LITE        --> VCC

with this code
Code:
#define sclk   21
#define mosi  22
#define cs   23
#define dc   3
#define rst   0

#include <Adafruit_GFX.h>
#include <Adafruit_ST7735.h>
#include <SPI.h>

Adafruit_ST7735 tft = Adafruit_ST7735(cs,dc,mosi,sclk,rst);

 smiley-cry

5  Using Arduino / Displays / Re: Help Wiring Adafruit 1.8" TFT LCD and 1284p standalone project on: November 11, 2012, 04:44:25 am
Many thanks all,

So I use the adafruit library, so if I watch inside  the library code I see:

Code:
// Constructor when using hardware SPI.  Faster, but must use SPI pins
Adafruit_ST7735::Adafruit_ST7735(uint8_t cs, uint8_t rs, uint8_t rst) {
  _cs   = cs;
  _rs   = rs;
  _rst  = rst;
  hwSPI = true;
  _sid  = _sclk = 0;
}

and the initialization methods with correct pinmode

Code:
// Initialization code common to both 'B' and 'R' type displays
void Adafruit_ST7735::commonInit(uint8_t *cmdList) {

  constructor(ST7735_TFTWIDTH, ST7735_TFTHEIGHT);
  colstart  = rowstart = 0; // May be overridden in init func

  pinMode(_rs, OUTPUT);
  pinMode(_cs, OUTPUT);
  csport    = portOutputRegister(digitalPinToPort(_cs));
  cspinmask = digitalPinToBitMask(_cs);
  rsport    = portOutputRegister(digitalPinToPort(_rs));
  rspinmask = digitalPinToBitMask(_rs);

  if(hwSPI) { // Using hardware SPI
    SPI.begin();
    SPI.setClockDivider(SPI_CLOCK_DIV4); // 4 MHz (half speed)
    SPI.setBitOrder(MSBFIRST);
    SPI.setDataMode(SPI_MODE0);
  } else {
    pinMode(_sclk, OUTPUT);
    pinMode(_sid , OUTPUT);
    clkport     = portOutputRegister(digitalPinToPort(_sclk));
    clkpinmask  = digitalPinToBitMask(_sclk);
    dataport    = portOutputRegister(digitalPinToPort(_sid));
    datapinmask = digitalPinToBitMask(_sid);
    *clkport   &= ~clkpinmask;
    *dataport  &= ~datapinmask;
  }

  // toggle RST low to reset; CS low so it'll listen to us
  *csport &= ~cspinmask;
  if (_rst) {
    pinMode(_rst, OUTPUT);
    digitalWrite(_rst, HIGH);
    delay(500);
    digitalWrite(_rst, LOW);
    delay(500);
    digitalWrite(_rst, HIGH);
    delay(500);
  }

  if(cmdList) commandList(cmdList);
}


// Initialization for ST7735B screens
void Adafruit_ST7735::initB(void) {
  commonInit(Bcmd);
}



What could I check?

Best regards

Marco

6  Using Arduino / Displays / Help Wiring Adafruit 1.8" TFT LCD and 1284p standalone project on: November 10, 2012, 02:25:41 pm
Hi all, I try to use  1.8" 18-bit color TFT LCD display
http://adafruit.com/products/358

with my breadboard 1284p project

So I wired

Code:
Gnd          --> GND
VCC          --> 5v
RESET      --> D0
D/C          --> D3
CARDCS    --> NONE
TFTCS      --> D4
MOSI        --> D5
SCK         --> D7
MISO        --> NONE
LITE        --> VCC

this is the pin mapping
Code:
// ATMEL ATMEGA1284P
//
//                   +---\/---+
//           (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
//                   +--------+
//

and i use adafruit labrary with this code...

Code:
#define cs   4
#define dc   3
#define rst   0

#include <Adafruit_GFX.h>
#include <Adafruit_ST7735.h>
#include <SPI.h>

Adafruit_ST7735 tft = Adafruit_ST7735(cs,dc,rst);

and I try with the example graphictest_highspeed

But unfortunately the display is white totally illuminated.
upload code is via a programmer. And the sketch is uploaded correctly. I modified the code to add in the loop a  blinking LED and it works. Any idea? Where am I doing wrong? thanks

best regards

Marco








7  Using Arduino / Sensors / Re: What kind of sensure pressure for extreme environment? on: October 25, 2012, 10:07:37 am
The project is for a dive computer for rebreather equipment...so
Salt water
temperature range appropriate to the marine environment
20 bar for pressure
budget 100$
dimension some cm
may be analog or digital but must measure the absolute pressure. Since this is a prototype and I have not professional equipment that I would not smd.
I see the project diveduino so nice, this project use intersema pressure sensor. I also have that type of sensor but I find it very difficult to solder the pins so I was wondering if you could find some other type of sensor.

best regards
Marco
 

8  Using Arduino / Sensors / What kind of sensure pressure for extreme environment? on: October 24, 2012, 08:43:40 am
Hi all, what kind of pressure sensor do you recommend for a project operating at 20 bar ( 290 psi or 2000kpa)?
The sensor must be absolute, not in smd tecnology and must be work in water.
Any idea?

thanks in advice

Marco
9  Using Arduino / Displays / Re: UTFT and serial display ITDB02-2.2SP InitLcd with random pixel [SOLVED] on: October 24, 2012, 01:05:29 am
I think it's impossible to do with LCD. Thanks anyway for the answer. I will use the technique to put in  off and on again when dispaly it' s ready.

best regards

Marco
10  Using Arduino / Motors, Mechanics, and Power / Which voltage regulator used for the microprocessor 1284p? on: October 24, 2012, 12:48:23 am
Hi all, in order to improve the durability of the batteries I was studying the possibility to replace the 7805 with a boost converter or with a step up-step down converter. The project I'm working on uses a microprocessor 1284, lcd dispaly, a rtc, a adc 12-bit, a pressure sensor and three oxygen sensors. And I would feed the device with a maximum of 2 batteries of 3.6 V. The device is in sleep as long as you do not press a button that wakes up via interrupt the microprocessor and the display lights up. In sleep mode, the all-consuming as few mA when lit consumes about 90mA.

Boost converter
http://www.pololu.com/catalog/product/798

StepUp-stepdown coverter
http://www.pololu.com/catalog/product/2119

and the battey
http://www.atbatt.com/product/3443.asp

Obviously using the boost converter would use only a battery.
What do you recommend? I wish it had at least 50 hours of operation and sleep mode in a few months.

Best Regards

Marco

11  Using Arduino / Displays / Re: UTFT and serial display ITDB02-2.2SP InitLcd with random pixel on: October 22, 2012, 01:39:33 pm
Hi, thanks for you reply... I have found that to put lcd in off/on I must send the command 0x28 0x29

so  in my sketch..
Code:
myGLCD.InitLCD();
myGLCD.lcdOff();
myGLCD.clrScr();
delay(1);
myGLCD.lcdOn();


In the library...
Code:
void UTFT::lcdOff()
{
cbi(P_CS, B_CS);
switch (display_model)
{
        case HX8340B_S:
case PCF8833:
LCD_Write_COM(0x28);
break;
}
sbi(P_CS, B_CS);
}

void UTFT::lcdOn()
{
cbi(P_CS, B_CS);
switch (display_model)
{
        case HX8340B_S:
case PCF8833:
LCD_Write_COM(0x29);
break;
}
sbi(P_CS, B_CS);
}

all works fine  but now when LCD start the back light is on ( so the display appears all white) also if LCD is in off state, I can control the back light?

best regards
Marco
12  Using Arduino / Displays / UTFT and serial display ITDB02-2.2SP InitLcd with random pixel on: October 19, 2012, 01:15:31 am
Hi all, I'm using the last version of UTFT library for Arduino. I have wired the serial display ITDB02-2.2SP that use the controller HX8340B_S. The library work very fine but a little problem in InitLcd module. When I call InitLcd module the display go in power on and it shown random pixel. It is possible to pre initialize the display memory to black pixel? So the display would start all black.

best regard
Marco
13  Using Arduino / Microcontrollers / Re: 1284p-pu programming problem ( without bootloader) [Solved] on: September 25, 2012, 04:23:13 pm
hemmmm File->Upload Using Programmer this is the correct way smiley-grin
Now the led blink smiley-grin

thanks
14  Using Arduino / Microcontrollers / Re: 1284p-pu programming problem ( without bootloader) on: September 25, 2012, 03:09:48 am
but why if I use
sudo avrdude -c avrispv2 -p m1284p -P /dev/ttySA0 -t -v -v

i see

avrdude: Device signature = 0x1e9705
avrdude: safemode: lfuse reads as FF
avrdude: safemode: hfuse reads as DC
avrdude: safemode: efuse reads as FD

but when i enter in terminal mode and type command sig


the result is

Device signature = 0x000000
15  Using Arduino / Microcontrollers / 1284p-pu programming problem ( without bootloader) [Solved] on: September 25, 2012, 01:30:26 am
Hi all, I have a little big problem with my 1284p
I realize a simple schema for a blink sketch with power, clock, led  like this

http://maniacbug.wordpress.com/2011/11/27/arduino-on-atmega1284p-4/

i make all necessary changes to arduino ide (  1.0 and 1.01)

but the upload fail with this error:

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

         System wide configuration file is "/home/marco/Desktop/arduino-1.0.1/hardware/tools/avrdude.conf"
         User configuration file is "/home/marco/.avrduderc"

         Using Port                    : /dev/ttySA0
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 57600
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding

avrdude done.  Thank you.


while if i go in terminal mode with avrdude i see this message:

Code:
marco@kalimero:~$ sudo avrdude -c avrispv2 -p m1284p -P /dev/ttySA0 -t -v -v

avrdude: Version 5.11.1, compiled on Oct 30 2011 at 10:41:10
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "/etc/avrdude.conf"
         User configuration file is "/home/marco/.avrduderc"

         Using Port                    : /dev/ttySA0
         Using Programmer              : avrispv2
         AVR Part                      : ATMEGA1284P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PA0
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    10   128    0 no       4096    8      0  9000  9000 0xff 0xff
           flash         65    10   256    0 yes    131072  256    512  4500  4500 0xff 0xff
           lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00

         Programmer Type : STK500V2
         Description     : Atmel AVR ISP V2
         Programmer Model: STK500
         Hardware Version: 15
         Firmware Version Master : 2.10
         Topcard         : Unknown
         Vtarget         : 0.0 V
         SCK period      : 3.3 us
         Varef           : 0.0 V
         Oscillator      : 3.686 MHz

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9705
avrdude: safemode: lfuse reads as FF
avrdude: safemode: hfuse reads as DC
avrdude: safemode: efuse reads as FD
avrdude> sig
>>> sig

Reading |                                                    | 0% 0.00savrdude: ser_recv(): programmer is not responding
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_cmd(): short reply, len = 0
avrdude: ser_recv(): programmer is not responding
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_cmd(): short reply, len = 0
Reading | #################                                  | 33% 10.01savrdude: ser_recv(): programmer is not responding
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_cmd(): short reply, len = 0
Reading | ################################################## | 100% 15.01s

Device signature = 0x000000

avrdude> ^Cmarco@kalimero:~$

any idea? I verify the wiring to programmer ( pololu ) and it is ok ( i think )

thanks

Marco

Pages: [1] 2