Show Posts
Pages: 1 [2] 3
16  Forum 2005-2010 (read only) / Français / Re: Une LED qui mesure l'éclairement et qui éclair on: September 28, 2006, 06:26:36 am

d'accord, j'ai lu encore dans la datasheet et dans les "sourcecodes" de arduino.
et maintenant je comprends un peut plus. comment ils font les definitions pour les "pins"
c'etait un bon conseille!

woo
17  Forum 2005-2010 (read only) / Français / Re: Une LED qui mesure l'éclairement et qui éclair on: September 28, 2006, 04:22:51 am
Salut Benoit,

merci bien!
je l'ai trouvé dans le datasheet.
mais quand-meme j'ai la grande question, comment tu arrives d'ecrire le code comme ca?
c'est du C/C++? je sais travailler avec la language arduino, mais malheuresment pas plus.
c'est très compliqué?
(pardonnes mon mauvais francais)  

woo
18  Forum 2005-2010 (read only) / Français / Re: Une LED qui mesure l'éclairement et qui éclair on: September 27, 2006, 09:46:56 am

Salut Benoit,

Quote
Solution, mettre ceci dans la fonction setup() pour désactiver les "pull-up" : _SFR_IO8(0x30) |= 4;

tu peux expliquer les details de ce morceau de code?
ca desactive tout les pull-ups ou seulement les deux tu as utilisé?
j'ai cherché dans la documentaion du Atmeg8 mais, j'ai rien trouvé.


woo
19  Forum 2005-2010 (read only) / Troubleshooting / strange pin 13 behaviour when flashing via avrdude on: September 05, 2006, 03:01:20 pm
hi,

i wrote a prog, where i have to youse all of the digital pins as output to multiplex many inputs.
i used avrdude to flash the .hex file directly via isp to the atmega8 without bootloader, beceause of memory space reasons.
but then pin 13 behaves differently (perhaps more than only this one), im not shure what.
is the behaviour of the pins declared already in bootloader?
so it makes a difference using the atmega8 without bootloader.

cheers
woo
20  Forum 2005-2010 (read only) / Interfacing / Re: PCF8574 - Driving an LED w/ I2C - Very Dim LED on: March 21, 2007, 03:31:55 pm
Hi there,

I try to get this i2c thing working, but without any succes. Im using a pcf 8574a, with some LEDs attached. But nothing  happens.
I've got some basic questions about the i2c protocol:
The adress consist of a 8 bit number, eg 112 or 56, ...? so i use like  "Wire.beginTransmission(112);"?
I dont understand the datasheet  how to write to the ports of the PCF8574, what do i have to write to that device?
http:// http://www.reichelt.de/?SID=208PfrUqwQARQAAH6JtH4852ebc6602248fba4d6fe06e77038d10;ACTION=7;LA=6;OPEN=1;INDEX=0;FILENAME=A300%252FPCF8574%2523PHI.pdf

 i see with the oscilloscope that sda and scl are well connected.

perhaps someone could post some basic code which worked aleady.

greetz

woo
21  Forum 2005-2010 (read only) / Interfacing / Re: Using the I2C PCF8563 Real Time Clock on: September 10, 2007, 11:03:01 am
check this post, the last post by libhart might help you. I didnt tried it yet, but i will soon, then I'm gonna post my results.

w  
22  Forum 2005-2010 (read only) / Interfacing / Re: Using the I2C PCF8563 Real Time Clock on: June 19, 2007, 04:36:48 am
Hi,
did you ever find a solution on this issue?
I tried to use the ds1307, with the same results as you. i can write to the clock registers and read them, but nothing changes, the values wont change. The clock seems not to run.
The Post i've started: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1180908809/5#5


any news?
woo
23  Forum 2005-2010 (read only) / Interfacing / Re: real time clock ds 1307 on: July 01, 2007, 06:13:39 pm
This sounds great!
Thanks a lot I'll try it soon. I was wondering as well about setting the register pointer, but i didn't get a clue how to do... but this looks good.

thanks again!

woo
24  Forum 2005-2010 (read only) / Interfacing / Re: real time clock ds 1307 on: June 04, 2007, 11:07:53 am
I checked the Crystal it has a capacity of 12 pf - should work. But I tried as well with 22pF caps. Still the same.
In some other forums about microkontrollers they write abut that you have to send a 'TWI write' first, then 'repeated (TWI) start' then you can Read the register.  
I guess i need to set the pointer without writing directly to the register.

any ideas?

best
woo
25  Forum 2005-2010 (read only) / Interfacing / Re: real time clock ds 1307 on: June 03, 2007, 05:55:18 pm
Thanks for the fast reply,

I read that, bit 7 of register 00.
But isnt it the same as the "seconds" Register? So it will be set with the _sec value, which is set to 4 (binary 00000010) at the moment?
How to Adress the different registers, just by executing eg 3 times a Wire.send() line to acces the 3rd register?


best
woo
26  Forum 2005-2010 (read only) / Interfacing / real time clock ds 1307 on: June 03, 2007, 05:13:29 pm
Hi,

im trying to use the ds 1307 realtimeclock
(datasheet:http://www.reichelt.de/?SID=208PfrUqwQARQAAH6JtH4852ebc6602248fba4d6fe06e77038d10;ACTION=7;LA=6;OPEN=1;INDEX=0;FILENAME=A200%252FDS_1307.pdf),
connected via i2c two wire bus
im able to set the the time (it seems like it works) , but if i try to read from the ds 1307 i get always the time and date i set up in 1307 memory. There is no increasement of time.
I use a 32.768 kHz quartz crystal connected to he x1/x2 pins of the RTC, if I remove it there is the same behaviour, nothing changes.

Here is the code I use:


Code:

#include <Wire.h>

byte _sec =4;
byte _min=8;
byte _hour=3;
byte _day =5;
byte _date=2;
byte _month=6;
byte _year =7;

boolean state;

void setup()
{
  Wire.begin();        // join i2c bus (address optional for master)
  Serial.begin(9600);
  pinMode(13, OUTPUT);
  Wire.beginTransmission(104); // transmit to device #104, the ds 1307

    // **********setting time**************
 // Wire.send(sendung, 8); //sec
  Wire.send(_sec); //sec
  Wire.send(_min); //min
  Wire.send(_hour);  //hour
  Wire.send(_day);  //day
  Wire.send(_date); //date
  Wire.send(_month);  //month
 // Wire.send(_year);  //year
  

      
                  
  Wire.endTransmission();    // stop transmitting
}

void loop()
{

 delay(100);

  Wire.requestFrom(104, 6);    // request 6 bytes from slave ds1307
  while(Wire.available())    // slave may send less than requested
  {
    digitalWrite(13,state); //LED on pin 13 to see if there is activity
    state=!state;
    int c = Wire.receive();
    Serial.println(c);  

  }

delay (100);
}


thanks for help


woo
27  Forum 2005-2010 (read only) / Interfacing / Re: USB serial + serial communication over RF on: June 04, 2007, 11:14:49 am
You'll need the software serial for the RF, if you want to communicate at the same time with the computer via usb. The Serial<->USB  uses already the UART (RX/TX pin) of the Atmega8.


woo
28  Forum 2005-2010 (read only) / Interfacing / Re: Multiply the analog Outputs up to 12 channels on: October 10, 2006, 04:19:06 am
i have no idea, but seems interesting.
someone got a hint?
e.g. part number

cheers
29  Forum 2005-2010 (read only) / Interfacing / Re: Multiply the analog Outputs up to 12 channels on: September 23, 2006, 06:13:43 pm
hi
you could youse an analog multiplexer like described in tutorials thread. with that device you can send or recive a certain voltage, or a pulsed signal, or whatever via one wire to the ic where its spread (multiplexed) over up to 16 ch if you youse the 4067b for example. you need again 5 wires to controll the multiplexer.
its a serial technique, so if you run the controll programm very quick it seems to be same time.
if you combine them you'll have even more chs.
costs around 1,50 eur.

regards
woo
30  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: 'midi in" project.... on: September 23, 2006, 07:02:50 pm
i got it working.
partwise.
that means im only able to read the second byte of the midi byte stream. like:
if (serbyte == 61) {
    digitalWrite(ledPin2, HIGH);
    }
  if (serbyte == 73) {
    digitalWrite(ledPin2, LOW);
    }
  
 if (serbyte == 62) {
    digitalWrite(ledPin3, HIGH);
    }
  if (serbyte == 74) {
    digitalWrite(ledPin3, LOW);
    }

..... and so on
that means its just the note number wich is recognized, neither channel nor volume/noteOn/noteOff bytes.
in this code example i use one note to turn on the LED, anotherone to turn it off...
but im already a little bit happy, like this i can read notes. only problem at the moment: there must not be some other midisignals on the wire if yes--big trouble! because theres no channel separation.



greets
woo
Pages: 1 [2] 3