Show Posts
Pages: [1] 2 3 ... 11
1  Using Arduino / Programming Questions / Re: I2C transmission on RA8875 on: May 07, 2014, 08:06:21 am
Please check the photos in order to understand what i am asking. in order to write to a register you have to start the communication send the register and then  read or write data to it. The first byte that it is send has the address of the device and the type of the command(read/write) and then you send the register you want to write or the one that you want to read.I was wandering if the request from or the begingTransmittion is that first byte according the photos.

Also i need to know if it is the correct way to use the requestfrom function is this way:

1)beginTransmittion
2)wire.write(0)
3)endTransmittion
4)requestioFrom
5)wire.read()
2  Using Arduino / Programming Questions / I2C transmission on RA8875 on: May 07, 2014, 05:51:05 am
I have the datasheet of RA8875 and i want to setup the I2C protocol. I have added pages from the datasheet for the I2C
 I need to know if beginTransmittion(address) sends the first the first byte to the slave device the IICA[5:0](that contains the address plus the RS/RW. If this is correct does the next function could do the work?
The same question exist for the function requestfrom(address,bytes);
 
Code:
void  RA8875::writeCommand(uint8_t d)
{
Wire.beginTransmission(write_cmd_addr);//write_cmd_add=0x0e
Wire.write(d);
Wire.endTransmission();
}

serveral codes before when reading before request from use beginTransmissino(addesss) followed by a Wire.write(0) and endTransmittion(). The the use requestfrom(ardderss,bytes).

Isn't it correct if i do just requestfrom and then wire.read() ass shown in one of the sites examples?

Also the photos show that there is an Anckowledge bit that i do not know how to implement it
3  Using Arduino / Programming Questions / Re: definition of type bit for arduino on: May 01, 2014, 04:11:51 pm
Did you mean to delete the upload of the cpp file of the code i shared before? This is done but i do not know why this was a problem?
4  Using Arduino / Programming Questions / Re: definition of type bit for arduino on: May 01, 2014, 04:05:16 pm
I am not exactly following what you are saying, if you can anylise it a bit it would be wonderful
5  Using Arduino / Programming Questions / Re: definition of type bit for arduino on: April 30, 2014, 01:55:29 pm
So the only way is to write the i2c communication with the RA8875 from the beginning i suppose and not to steal it from the demo that  they give
6  Using Arduino / Programming Questions / definition of type bit for arduino on: April 30, 2014, 01:15:58 pm
I need to tranfer a code for a tft made for C51 to arduino.In the code there is the type bit that is used for the spi and the iic protocol. bit tho is not defind for the arduino is there any solution?i give the code

[
7  Using Arduino / Displays / 7" tft Ra8875 with arduino Uno on: April 25, 2014, 09:49:04 am
I am using a mutitouch 7" tft lcd with the RA8875 chipset

I have a problem wit the communication.
I took the Adafruit_GFX lib from gifhub and the RA8875 lib they developed and managed to compile correctly. I fell into an infinite loop tho. The buildtest sketz uses spi mode 0 and and clock divider at 128 (i think that spi mode is 3 cause of the figure 6-18 in page 65 of the datasheet(tho it did not worked also). Also the sketz tries to read a register 0x0h i think and and returns false (witch goes in the infinite loop) if the value is not 75? I am trying to find this register in the datasheet to check its normal value in order to find where is the problem.
Why after initializetion function library changes the clockdivider?

The code from the lib i am talking about is this:

Code:
     boolean Adafruit_RA8875::begin(enum RA8875sizes s) {
      _size = s;

      if (_size == RA8875_480x272) {
        _width = 480;
        _height = 272;
      }
      if (_size == RA8875_800x480) {
        _width = 800;
        _height = 480;
      }

      pinMode(_cs, OUTPUT);
      digitalWrite(_cs, HIGH);
      pinMode(_rst, OUTPUT);
      digitalWrite(_rst, LOW);

      digitalWrite(_rst, LOW);
      delay(100);
      digitalWrite(_rst, HIGH);
      delay(100); SPI.begin();
      SPI.setClockDivider(SPI_CLOCK_DIV128);
      SPI.setDataMode(SPI_MODE0);
     
      if (readReg(0) != 0x75) {
        return false;
      }

      initialize();

      SPI.setClockDivider(SPI_CLOCK_DIV4);

      return true;

After setting the spi mode in the code i did a few changes to test spi connection

Code:
  uint8_t x=readReg(0);
  Serial.println(x);

  writeReg(0,0x20);
  Serial.println(readReg(0));
  Serial.println(readReg(0x01));
  Serial.println(readReg(0x02));

The result in the terminal was the same every register give result 255

Quote
RA8875 start
255
255
255
255
RA8875 Not Found!

the last line is cause of the return of False and then the program goes to an infinite loop.
The 7" tft is this:
http://www.buydisplay.com/default/7-inch-lcd-module-capacitive-touch-screen-panel-i2c-spi-serial

Any help to make it work?
8  Using Arduino / Programming Questions / arduino robot lib error on: April 23, 2014, 06:13:16 pm
I am using adafruit R8875 lib for the same chipset with adafruit_glx graphic lib.These 2 libs use robot_control lib. My problem is that i get a compile error from the last lib.

The error is this and it is the same even if i try to compile an example from the arduino robot library


Quote
C:\Program Files\arduino\libraries\Robot_Control\ArduinoRobot.cpp: In constructor 'RobotControl::RobotControl()':
C:\Program Files\arduino\libraries\Robot_Control\ArduinoRobot.cpp:8: error: 'LCD_CS' was not declared in this scope
C:\Program Files\arduino\libraries\Robot_Control\ArduinoRobot.cpp:8: error: 'DC_LCD' was not declared in this scope
C:\Program Files\arduino\libraries\Robot_Control\ArduinoRobot.cpp:8: error: 'RST_LCD' was not declared in this scope
C:\Program Files\arduino\libraries\Robot_Control\ArduinoRobot.cpp: In member function 'void RobotControl::begin()':
C:\Program Files\arduino\libraries\Robot_Control\ArduinoRobot.cpp:18: error: 'MUXA' was not declared in this scope
C:\Program Files\arduino\libraries\Robot_Control\ArduinoRobot.cpp:18: error: 'MUXB' was not declared in this scope
C:\Program Files\arduino\libraries\Robot_Control\ArduinoRobot.cpp:18: error: 'MUXC' was not declared in this scope
C:\Program Files\arduino\libraries\Robot_Control\ArduinoRobot.cpp:18: error: 'MUXD' was not declared in this scope
C:\Program Files\arduino\libraries\Robot_Control\ArduinoRobot.cpp:19: error: 'MUX_IN' was not declared in this scope
C:\Program Files\arduino\libraries\Robot_Control\ArduinoRobot.cpp:22: error: 'BUZZ' was not declared in this scope
C:\Program Files\arduino\libraries\Robot_Control\ArduinoRobot.cpp:25: error: 'Serial1' was not declared in this scope

Any solution?
9  Using Arduino / Displays / R8875 adafruit lib on: April 23, 2014, 06:09:04 pm
I am using adafruit R8875 lib for the same chipset with adafruit_glx graphic lib.These 2 libs use robot_control lib. My problem is that i get a compile error from the last lib.

The error is this and it is the same even if i try to compile an example from the arduino robot library

Quote
C:\Program Files\arduino\libraries\Robot_Control\ArduinoRobot.cpp: In constructor 'RobotControl::RobotControl()':
C:\Program Files\arduino\libraries\Robot_Control\ArduinoRobot.cpp:8: error: 'LCD_CS' was not declared in this scope
C:\Program Files\arduino\libraries\Robot_Control\ArduinoRobot.cpp:8: error: 'DC_LCD' was not declared in this scope
C:\Program Files\arduino\libraries\Robot_Control\ArduinoRobot.cpp:8: error: 'RST_LCD' was not declared in this scope
C:\Program Files\arduino\libraries\Robot_Control\ArduinoRobot.cpp: In member function 'void RobotControl::begin()':
C:\Program Files\arduino\libraries\Robot_Control\ArduinoRobot.cpp:18: error: 'MUXA' was not declared in this scope
C:\Program Files\arduino\libraries\Robot_Control\ArduinoRobot.cpp:18: error: 'MUXB' was not declared in this scope
C:\Program Files\arduino\libraries\Robot_Control\ArduinoRobot.cpp:18: error: 'MUXC' was not declared in this scope
C:\Program Files\arduino\libraries\Robot_Control\ArduinoRobot.cpp:18: error: 'MUXD' was not declared in this scope
C:\Program Files\arduino\libraries\Robot_Control\ArduinoRobot.cpp:19: error: 'MUX_IN' was not declared in this scope
C:\Program Files\arduino\libraries\Robot_Control\ArduinoRobot.cpp:22: error: 'BUZZ' was not declared in this scope
C:\Program Files\arduino\libraries\Robot_Control\ArduinoRobot.cpp:25: error: 'Serial1' was not declared in this scope

Any solution?
10  Using Arduino / Displays / 1.8 TFT adafruit lib problem on: January 10, 2014, 03:47:38 am
I have an 1.8 tft screen.I managedto work with the TFT Library of the Arduino IDE but i wanted to try also the Adafruit lib.I get a compile error and the IDE thinks somehow that it needs the ArduinoRobot lib and inside there i get error of undefinde macros.
This is the first 2 errors i get:

Quote
C:\Program Files\arduino\libraries\Robot_Control\ArduinoRobot.cpp: In constructor 'RobotControl::RobotControl()':
C:\Program Files\arduino\libraries\Robot_Control\ArduinoRobot.cpp:8: error: 'LCD_CS' was not declared in this scope

i have uploaded the graphictest example nothing more
11  Using Arduino / Interfacing w/ Software on the Computer / Arduino Pro Mini problem with arduino IDE on: November 26, 2013, 03:14:52 pm
I have an arduino pro mini that i use to control a led matrix.It was working properly with windows, i tried to use it in debian but the arduino ide does not recognize it.Iuse an ftdi converter that i bought from sparkfun i think.I tried to install ftdi drivers for linux but nothing.Is there somewhere i can search?
12  Using Arduino / Motors, Mechanics, and Power / Re: ArduMoto Shield PWM question on: November 26, 2013, 04:43:47 am
i am not sure i have understood what you say. I use pwm to change the rpm of the dc motor.In every direction i have the same result (both led turn on).Sotty i haven't attached the .sch file. The pins that guide the direction are independent. I only want to make motor go slower when they are close to the stop position.
13  Using Arduino / Motors, Mechanics, and Power / ArduMoto Shield PWM question on: November 25, 2013, 08:31:34 am
I use a pcb that has the schematic that i attached below it is Arduino Motor shield a free and commercial  schematic. I want a general guidance for something i have noticed.I use this arduino motor shield to control 2 DC motors.Whenever i use a duty cycle lower than 100%  both leds that indicate motion in one way are turned on.The motor continues to go the correct way and it stops correctly when it asked.
Is this common for the pcd according to the schematic caused by the PWM?  Or should i try to find the reason in my code?
I am interested in general for an opinion for this i did not gave code or anything cause i want to understand if this is possible for the pcb or it can be a problem.
14  Using Arduino / Displays / Re: liquid crystal i2c lib prob with eclipse on: November 25, 2013, 08:16:29 am
It was an eclipse problem not a library problem.The only thing that was not correct in the library was the pins that are defined for rw ,enable , etc which for these another post in the forum has it correct so i just changed them and it worked before i had to do my last choice which was to open the datasheets of the I2C driver to check the pinout of it and the board's pinout path
15  Using Arduino / Displays / Re: liquid crystal i2c lib prob with eclipse on: November 19, 2013, 10:48:08 am
well i you have any experience with eclipse forum you wouldn't do that question.Well anyway i managed to solve my problem and i am sure that this is not an eclipse problem it was a programming in general problem that had to do with libraries that lcd use in general.
Pages: [1] 2 3 ... 11