Show Posts
Pages: 1 2 [3] 4 5 ... 10
31  Using Arduino / Microcontrollers / Re: ATMEGA 328 bootloader or re-code the actual ? on: May 18, 2012, 03:50:56 pm
The Watchdog in itself works, at my code the timer2 reset the watchdog timer, the issue is when it do not perform the task, I mean if y comment the wdt_reset() call the watchdog acts and reset the board, but because the timer keeps counting the uP do not start again.

I think that this is because the watchdog timer do not reset itself.

I hope that is because we do not clears this counter at the boot-loader functions. It only start again if I recycle the power source.

My boot is a pro 8 Mhz and 3V3, now i will see this boot-loader code and I will change to run at 8Mhz and 3V3, I think that this is the best option.... I'm right??

Best Regards
32  Using Arduino / Microcontrollers / ATMEGA 328 bootloader or re-code the actual ? on: May 17, 2012, 08:39:09 pm
Hi all!

I'm working with a ATMEGA328 and the watchdog functions. My code is this:


#include <MsTimer2.h>
#include <avr/wdt.h>
#define LED_GREEN 6
#define LED_RED 7

void setup(){
      MCUSR = 0;
      MsTimer2::set(500, SecondInt);


void loop(){
// nothing yet!!

void SecondInt(){

Reading a little about the WATCHDOG issue, Atmel saids that we must clear the MSUSR register, because if not the watchdog counter remains until the next power-on condition. This mean that the uP do not run-up until the power will be removed and apply it again....nice thing!! a slave reset technician is need it!  smiley-yell

So, I think that someone forget this little detail because that is what is wrong with my cpu, it do not reset until I turn it off, wait some seconds and apply power again, i check too the default fuses values and looks great. (Note: jumping into the reset button do not do nothing) smiley-razz

I think that this MSUSR = 0 must be the firts line at the bootloader.

Best Regards!
33  Using Arduino / Programming Questions / Why the watchdog at Arduino works wrong? on: April 11, 2012, 12:53:23 pm
I'm testing the watchdog code that is posted at the page.
I' using the same code & libraries into a Wiring 1.0 Mega128 STKV2 boot-loader and works great.

Now using this int a Arduuno pro (3V3-8Mhz) if i not reset the wdt it reset the CPU but when it restart the CPU goes into a infinite loop.
If I change the voltaje form 3V3 to 5V the CPU starts one time, the watchdog trigger and go again into this infinite loop.

I test to reseting the wdt at the first thing at the setup() function.

Looks like the fuses are wrong seted, some ideas to fix this detail?

Best Regards!!
34  Using Arduino / Networking, Protocols, and Devices / Carry audio via IP? on: February 29, 2012, 09:28:39 pm
Hi all!
I'm trying to use IP as link to broadcast audio. Not music only voice audio so is less complex. I work a lot with IP phones and some other audio codec as GSM and SPEEX. But now i want to do but using hardware and not a computer. What i remember is that the more simple way to digitalize voice is using G.711 codec. (u-law)

And i remember that Motorola have some chips that comes in some telecom carrier equipment. This is the MC145540 this is a ADPCM Codec.
This device can be controlled via SPI and get me the ADPCM input/output in two IC pins.

Because i don't have any experience using this processors and i read some topics about VOIP in the forum i posted this so maybe is helpfully to others.

Best Regards
35  International / Español / Re: GPRS- PDP: deact on: November 08, 2011, 09:18:02 pm
Como estas Fernando.
A mi me esta pasando lo mismo desde que cambie de claro a movistar, se conecta cuando quiere y ademas de no iniciar el entorno PDP le cuesta muchisimo iniciar GPRS.
Generalmente solo tarda algunos segundos en iniciar el entorno pero por alguna razon hace cualquier cosa sobre movistar.

Yo sospecho que es algo en el firmware de la placa, lo que no encuentro dentro del manual de la placa es como activar y desactivar el entorno PDP y GPRS para intentar nuevamente, esta muyy escueto el manual de esto amigos orientales!

36  Using Arduino / Networking, Protocols, and Devices / Re: RFM22 and out of sequence bytes? on: October 03, 2011, 03:11:09 pm
When i started with this modules and when i do not use the Mesh library, at my library every time that i got byte to read at the RX buffer, first i ask to the module that tell me how many bytes are ready to be reeded, and only then read exactly the bytes quantity, copy then to the RX buffer. Al this task will be done at a time slot, if the data was reeded at that time slot the packet is valid.

I think that some procedure needs a little bit more time to process the buffers, remember that we are a using this FIFO with a handshake procedure, so this procedure will be fast that the procedure that fills the TX buffer.

May be including a delay at the moment when the Tx FIFO is filled, other thing is that i was using 63 bytes and not 64, and only this help a lot. In fact my RX procedure don't care about how many byte the FIFO sends, it accumulate them always that the time slot is alive using the Rx register as index for the buffer management.

At my application the library works great but for some reason after 1 hour the module desynchronise and do not receive more data. Even i reset it
using the init() function, this some times work and sometimes not. Depends too about how long is the TX buffer.

Very small issues! for this complex library, what i don't know is if using temp() or other procedure to test if the module is alive and if not use the HW reset and start over.
I got a non-mesh code for several of this modules and they have more than 4 month transmitting/receiving with any issue, i mean the RFM hardware do not fails, i'm using FRM22, RFM31 and RFM43 without issues.

Best Regards

37  Using Arduino / Networking, Protocols, and Devices / Re: New library for RF22, RFM22 radio modules on: August 22, 2011, 08:02:51 pm
Hi all!
Mike why you store this:

   /// Array of the last seen sequence number indexed by node address that sent it
    /// It is used for duplicate detection. Duplicated messages are re-acknowledged when received
    /// (this is generally due to lost ACKs, causing the sender to retransmit, even though we have already
    /// received that message)
    uint8_t _seenIds[256];

Why not use a TTL at the message header?, the packet that is at the netowork for more than some time will be discarted at the next node

and about the TEMP buffer, i think that you are using the same for TX/RX, but why not use a reference from the main loop?

   /// Temporary mesage buffer
    static uint8_t _tmpMessage[RF22_ROUTER_MAX_MESSAGE_LEN];

At the first will be 256 bytes less if we can think in other mechanism, and at the tmpMessage will be some too !

I will keep coding!

Best Regards
38  Using Arduino / Networking, Protocols, and Devices / Re: New library for RF22, RFM22 radio modules on: August 22, 2011, 06:19:18 pm
Solved!...a better coding and more few bytes free at Ram and now works great!

Now only to get more free memory, what is the part of the library that use more RAM?, the routing table is not...

Best Regards
39  Using Arduino / Networking, Protocols, and Devices / Re: New library for RF22, RFM22 radio modules on: August 22, 2011, 10:05:48 am
Hi all!
Have test this library with a 200 chars payload buffer?.
For some reason my client-server MESH fails, i get the ACK from server and the server can se the packet send but not the payload of this packet.

Now I'm testing all about the FIFO and if the Int() of the module recharge the next 64 bytes on the TX FIFO.

The library work is i divide this 200 byte buffer into several 64 bytes?

Best Regards
Frank smiley-razz
40  Using Arduino / Networking, Protocols, and Devices / Re: New library for RF22, RFM22 radio modules on: August 11, 2011, 01:01:53 pm
From the module, the Tx/Rx switch is inside the silicon.

Now for the atenna diversity application, the chip don't have built-in the antenna switch, you MUST build this polarization switch external to the RFM22 device.

The control from this switch is made via GPIO outputs, the inputs TX-ANT and RX-ANT is like a SDPT-SW sensor, because the radio can be used for high speed radio links, the radio must know when the SPDT switch is ready to transmit, i mean when the selected antenna is successfuly connected

8.9. Antenna Diversity
To mitigate the problem of frequency-selective fading due to multi-path propagation, some transceiver systems use a scheme known as antenna diversity. In this scheme, two antennas are used. Each time the transceiver enters RX mode the receive signal strength from each antenna is evaluated. This evaluation process takes place during the preamble portion of the packet. The antenna with the strongest received signal is then used for the remainder of that RX packet. The same antenna will also be used for the next corresponding TX packet.
This chip fully supports antenna diversity with an integrated antenna diversity control algorithm. The required signals needed to control an external SPDT RF switch (such as PIN diode or GaAs switch) are available on the GPIOx pins. The operation of these GPIO signals is programmable to allow for different antenna diversity architectures and configurations. The antdiv[2:0] bits are found in register 08h “Operating & Function Control 2.”
The GPIO pins are capable of sourcing up to 5 mA of current, so it may be used directly to forward-bias a PIN diode if desired.

This idea is widely used on high speed radios.
41  Using Arduino / Networking, Protocols, and Devices / Re: New library for RF22, RFM22 radio modules on: August 11, 2011, 09:07:56 am
I think that the two antenna outputs got a reason, and is not about who antenna transmit and who receive.

At radio systems you got a coverage problem when the frecuencies goes very high, and this situation do not correct using more power at the transmiter or at the receiver. This is an signal angle problem and is so complex that the signal loose all the power is like it pass for virtual 0 degree and loose itself.

The only way to correct this situation is use another antenna equal to the first but in a different polarization angle, at cellular systems they use a second receiver w/a second receiver antenna to correct this sum both receivers signals.

At the PDF the diversity antenna algorithm is included on the chip firmware, but the antenna switch is external via PIN/GAS diodes, this antenna switch is controlled via the GPIO PINS, that means that this SW is EXTERNAL and is not included on the RFM22/23 PCB.

Build a antenna SW at this frecuencies will be very hard!

Best Regards
42  Using Arduino / Networking, Protocols, and Devices / Re: New library for RF22, RFM22 radio modules on: August 07, 2011, 05:19:54 pm
Have you all the network operation theory writed in some document?

The only thing that i can't understand about MESH is if each node repeats each datagram, how this datagram first reach the destination node after jump several times, and how the destination NODE respond to this datagram. I think that in both cases they will not use the same node. I think that the route have different direction.

I mean, if the server wants to send a command to the last node in the network, at the firts node that repeat the datagram it will be send back to the same node that generate this datagram, how the node send to others nodes and not go back to the server?

I must read some theoryy!!

Best Regards

43  Using Arduino / Networking, Protocols, and Devices / Re: New library for RF22, RFM22 radio modules on: August 07, 2011, 10:56:18 am
Hi Mike!
Are you using frec hopping or only a conventional frec at the library?

Other thing is, how do you do when you ask at mesh for other node to send his beacon and two nodes can send the beacon, how them know that one must Tx before other?, have some order for this? the node Id for example?

At router's table, it use RSSI as variable to decide how will be the next node to send the packet?

I will write an encription library for the data payload

Best Regards
44  Using Arduino / Networking, Protocols, and Devices / Re: New library for RF22, RFM22 radio modules on: August 05, 2011, 02:23:33 pm
Hi Mike, i'm studing in detail your 1.5 lib.

Now how we can set-up the module without use the external interrupts pins?
I have my own lib but i'm not using the int inputs

Is not very clear, but the packet payload is about 255 bytes rigth?, i mean we can transmit 255 in FIFO mode?(the internal bufer is about 64bytes)

Can we use four digits as node ID? i mean 2F2F as ID for example?

I can test all this because i got a lot of RFM22 modules.

Best Regards
45  Using Arduino / Audio / Building a Trainer for drummers on: May 30, 2011, 04:26:19 pm
Hi all!!
I'm building a electronic drum based on Arduino. All about piezo and others are ready and working great.

But now what i want to do is build a trainer based on this drum. For now each patch have a little led that shows when i hit each patch.

So now using some drum program that generates a drum track, load into a VB application or similar and switch each patch's led at the correct squence and time. smiley-cool

Some program who save the track file in a XML/INI with the squence and time to load and decode it with my VB application?

Best Regards
Pages: 1 2 [3] 4 5 ... 10