Recent Posts

Pages: [1] 2 3 ... 10
1
The avrdude command line is duplicated from the Arduino standard programming interface output with Mega2560 selected. It knows the correct memory size from the avrdude.conf file.

I have done more testing and am starting to get an idea of the problem. I read a post on another forum about large gaps in code memory causing verify error at the point of the continuation of code. Strange that small gaps like between INT vectors used doesn't cause the problem.

I also found out avrdude reports memory addresses as bytes, not words, so the error address was actually the first byte of the data table. (word addr=0x8000 ; byte addr=0x10000).

When I remove the .ORG 0x8000 statement that sets the address of the data table and even add more data to the table, it now loads ERROR FREE. But I need the table to stay where I put it in code.

So now I need a way to fill the gaps between my code and the start of the data table with 0xFF at every byte.

Hmmmmmm, probably need more testing.

Anybody have a good method to fill the gaps easily?

Rick
2
Software / Duda operadores y funciones AD...
Last post by luisvc91 - Today at 01:59 am
Hola,

Tengo algunas preguntas sobre operadores en arduino y sobre algunas funciones. Probablemente es por fallo de concepto de operadores y/o operaciones. He mirado el manual de arduino en la web, pero no doy con lo que es.
Esto pertenece al código de la libreria SparkFun_ADXL345.
Code: [Select]
void ADXL345::setRate(double rate){
byte _b,_s;
int v = (int) (rate / 6.25);
int r = 0;
while (v >>= 1)
{
r++;
}
if (r <= 9) {
readFrom(ADXL345_BW_RATE, 1, &_b);
_s = (byte) (r + 6) | (_b & B11110000);
writeTo(ADXL345_BW_RATE, _s);
}
}


1.- ¿"v >>= 1" que operación hace? Se que >> despalza los bits a la derecha... pero el igual me desconcierta
2.- ¿Realmente que hace la funcion? porque no entiendo porqué normaliza a 6.25 la variable "rate", luego se mete en un while... Después si la variable r (parece ser un contador de.... bits?) es menor o igual que 9, ejecuta el readFrom... despues hace la sentencia del _s (no entiendo nada de lo que se hace en esa línea de código) y por último lo que me itneresa, escribe en el registro "ADXL345_BW_RATE" el valor de _s... aunque a priori _s no se parece en nada al rate que yo he introducido...
3.-De igual manera, la funcion leer
Code: [Select]
double ADXL345::getRate(){
byte _b;
readFrom(ADXL345_BW_RATE, 1, &_b);
_b &= B00001111;
return (pow(2,((int) _b)-6)) * 6.25;
}

No entiendo porque hace esa operación matemática para mostrar el valor del registro en int...

Gracias

Un saludo
3
Deutsch / Re: Pflanzengießanlage Problem...
Last post by combie - Today at 01:57 am
"moisture sensor 1.2" beim zuverlässigen Chinesen für ca 1 Komma 3 Euronen.....

4
General Electronics / Re: Help preventing EMI from i...
Last post by Wawa - Today at 01:57 am
No opto isolated relay modules, and five relays powered from Arduino's 5volt pin.
Seems like asking for trouble.
What is the supply voltage on the DC socket.
Mains switching contacts for complex (inductive) loads might need snubbering (R/C or varistor).
Low voltage inductive switching might need kickback diodes.
Leo..
5
Français / Re: Projet mesurer le niveau d...
Last post by elektrax - Today at 01:56 am
une cuve ronde de 10000 litres : réservoir cylindrique placé horizontalement ?

quelle méthode de mesure pour la jauge ?
à capteur de pression : relative par rapport à la pression atmosphérique ou absolue et quelle gamme de mesure : 100kPa 500kpa 700kpa ?
à détection capacitive ?
à UltraSons : sceptique

approche différente : mesurer le temps de fonctionnement du bruleur fioul   ?
avantages : l'endroit où est installée la chaudiere : le secteur est présent, pas  d'humidité, abrité
inconvénients : détection de la mise en marche de la pompe à mazout : detection du bruit par piezo ou micro, sur le bruleur d'une chaudiere buderus il y avait un neon qui s'allumait quand la pompe était alimentée , connaitre le débit du gicleur, je ne pense pas que ce soit d'une précision absolue, çà devait etre suffisant pour une estimation relative...
6
Hardware / Re: Circuito per leggere la re...
Last post by Maurotec - Today at 01:54 am
Quote
Unica cosa è che mi tocca avere due pin distinti per ogni gate e non uno solo, a meno che non ci siano altre soluzioni per comandare insieme i due mosfet.
Certo che c'è, il gate del mosfet P (lo chiamo Q1) lo colleghi al collettore di un bjt npn bc548-47-46 (o quello che hai nel cassetto) l'emettitore a GND e la base la colleghi al gate di Q2.

Quote
Perché correggimi se sbaglio ma mi sembra abbastanza utopistico (3,3V/4095 = 0,0008) apprezzare differenze inferiori al millivolt.
Quella è la risoluzione, ovviamente la temperatura può fare variare la lettura che ne ricavi per cui se leggi dall'ADC 1600 o 1700 sai che c'è collegato il motore da 5 ohm. Sperimentalmente ricavi il valore di ADC a cui aggiungi un +- 50 count ADC, per cui come dici tu un millivolt in più o meno non ti falsa l'identificazione del motore. Volendo con la risoluzione a 12-bit puoi provare a fare scorrere ancora meno corrente nella fase.

Visto che l'ADC dovrà lavorare in DC un filtro RC non può che aiutare ad avere letture meno ballerine.

Non conoscendo le caratteristiche delle porte di quella MCU non so dire se in serie al gate ci va o meno una resistenza e il suo valore, eventualmente un altro bjt npn risolve il problema.

Domanda: ma che simulatore stai usando?

Ciao.
7
What if 5V was within their operating range?  Would they theoretically simply just... keep working?  Or are you saying that it would pull an inordinate amount of current?
8
Thank you, meltDown,

The lights come on when I connect 9v to VIN and Ground.

It is a workaround, but unfortunately I am using the 2 Grounds for the IR sensor and the radio Rx.

Is there a fuse in the circuit for the barrel jack, and is it re-settable or replaceable?

And would leaving the power switched on for an extended time blow the fuse?

Thanks,

Mick
9
Deutsch / Re: Bewässerung einfach - Ich ...
Last post by wapjoe - Today at 01:53 am
Neben dem Strom, der sich sicher gegen einen kleinen Obolus von den Nachbarn abzwacken lässt, frag ich mich eher wie du den Arduino, bzw. die Bewässerungsanlage tagesaktuell programmieren willst? Internet vorhanden?
10
Software / Re: Arduino + Electrovalvula (...
Last post by santilococo - Today at 01:49 am
El problema es como haria eso de la medianoche? Porque lo más probable es que el dispositivo no esté encendido, por lo tanto una alarma no seria util ya que si la alarma pasa mientras que el dispositivo no estaba funcionando esta no "se activaria". Que propones? Saludos
Pages: [1] 2 3 ... 10