Show Posts
Pages: [1] 2
1  Using Arduino / Sensors / Re: Split-phase current sensing - best practice? on: March 13, 2011, 10:01:15 am
I have found the Allegro Hall-effect current sensors far superior to current transformers. They produce an analog output that is perfectly linear with current, are 100% isolated, and you can get AC versions that have an output that is .5 the supply at 0 current.  You can't directly add the output of two devices, however.
2  Using Arduino / Networking, Protocols, and Devices / Re: SNMP BER question on: March 09, 2011, 06:47:52 am
I agree, and I saw the scheme you posted above, but it doesn't seem to work for timer ticks.

Desperate people start looking everywhere there could possibly be help. 
3  Using Arduino / Networking, Protocols, and Devices / Re: SNMP BER question on: March 06, 2011, 09:15:34 am
I understand the relationship between Bytes, Words, and Longs.  But those rules do not apply to SNMP.

Check out

http://luca.ntop.org/Teaching/Appunti/asn1.html

And note that the rules apply no matter what processor you are using - AVR or Apple A5 or Intel.  They are part of the SNMP protocol.

I can't understand this well enough to find the answer myself.  I was hoping one of the people on the Agentuino project could
answer this.
4  Using Arduino / Networking, Protocols, and Devices / SNMP BER question on: March 05, 2011, 11:10:53 pm
I realize I'm asking a lot, but I am writing an SNMP agent for a different processor (not Arduino), so I wouldn't be surprised if I get kicked out, but I DO use Arduino sometimes.

I'm confused about the BER rules for the various data types.  Could someone  please help me? I don't know where else to turn.

As I understand it -

If I send an integer that is 0x7F or smaller, I send one byte.
If it is 0x80, I would send two bytes, the first being 0x00, the second would be 0x80. 
If it is 0xFF, I would send two bytes, the first being 0x00, the second being 0xFF.
If I want to send 0x7FFF, I would send two bytes, the first being 0x7F, the second 0xFF.
If I want to send 0x8000,I would send three bytes, the first being 0x00, the second 0x80, and the third 0x00

Is this correct?  If not, what is the answer?

And are timer ticks encoded in the same manner?

Please help!
5  Forum 2005-2010 (read only) / Development / Re: Newbie questions on: January 23, 2011, 08:40:56 pm
I get it.  You correctly guessed my question.  

But is there a resource that explains things like how many bytes are in various buffers, and what the interrupt priorities are? And if I have to clear the interrupt flags before I invoke the interrupt? And if they are automatically cleared when the ISR is exited. And what the interrupt latency is?  

You get the idea.
6  Forum 2005-2010 (read only) / Development / Re: Newbie questions on: January 23, 2011, 06:47:46 pm
So it is handling the buffers, the timeouts and all that?

If I have a routine that looks for serial input, and I have a really long DELAY statement, will it capture long strings while it is in the DELAY period?
7  Forum 2005-2010 (read only) / Development / Re: Newbie questions on: January 23, 2011, 01:44:18 pm
Thanks for all your help.  Maybe someday I'll be able to contribute to the libraries.

I'm still amazed, though - there is so much Arduino code out there to do all sorts of things - and very little of it is interrupt-driven.  
8  Forum 2005-2010 (read only) / Development / Re: Newbie questions on: January 22, 2011, 09:26:17 pm
I looked at that, but I don't need EXTERNAL interrupts, I need INTERNAL interrupts.  I suppose I could go into the libraries and modify them, but I would think that others have the same problems I do.  I have to monitor the RPM of 9 fan tachometers at once.  Currently, (in a PIC), I have a 200uSec timer interrupt that scans the tachometer input pins, XORs them with the last reading and increments 9 different counters - 1 for each bit position changed.  After a half-second, I read the counters, multiply them by a constant and come up with the fan RPMs - and start all over again.  I have to do that simultaneously with running 10 channels of A/D and receiving, processing and responding to SNMP packets coming in at 115Kbaud from a Lantronix MatchPortAR, AND responding to telnet packets coming in at 115Kbaud from the MatchPort's second serial port.

I do that presently with a PIC18F8723 running at 40Mhz.  I am considering moving to ATMEL parts, but I want to make certain that the hardware and software tools are easy to learn and use before I spend a lot of time.  

So far, I have found lots of neat examples for Arduinos, but easy, fast interrupts are a must, and I can't see many examples using them.  I'll keep looking for awhile before I give up.
9  Forum 2005-2010 (read only) / Development / Re: Newbie questions - Interrupts! on: January 22, 2011, 08:39:40 pm
I have another question.  In the PIC world, I use interrupts heavily. I need timer interrupts, serial port interrupts, and I2C interrupts (since my uC is an I2C slave).  I can't sit in a loop and wait for a particular event to happen.

I have searched the forum, and I can't find any good explanation of how to use interrupts in Sketch.
 
I see that the 2560 (which I'm using) has vectored interrupts.  That is great, but is the compiler smart enough to use them?  And if not, is there a work-around?
10  Forum 2005-2010 (read only) / Development / Re: Newbie questions on: January 22, 2011, 03:31:15 pm
Thank you.  That is one more step.  I have to say that while the level of abstraction that Sketch provides is very nice, it I am a bit uneasy about what is really going on.  I have seen compilers generate really  messy code.
11  Forum 2005-2010 (read only) / Development / Re: Newbie questions on: January 22, 2011, 02:16:29 pm
I appreciate the answers that you gave, and I'm looking at the 2560 datasheet right now.  

In "PIC - land", I use a lot of interrupts, so the interrupt latency is important.  If I write an ISRs in ASM, I have only 20-30 cycles of overhead.  If I write my ISRs in PicBasic, that increases to over 100. I can't figure out how much overhead that Sketch adds.  Is there an answer somewhere?

Also, PicBasic creates macros that then call the Microchip assembler, so it produces an ASM file.  If you want to know what the compiler is doing, you can look at the created ASM file.  I don't see anything like that in Sketch.  Is there a way I can see the actual instructions being programmed into the ATMEL?

12  Forum 2005-2010 (read only) / Development / Newbie questions on: January 22, 2011, 11:47:48 am
I'm a long-time PIC user and I write in both ASM and PICBasic Pro.  I'm used to dealing very close to the hardware, and the abstraction makes me feel uneasy.  I need to read the ATMEL datasheets, but before I do, I would like to ask the following questions:

What libraries make use of all the hardware functions of the chip?
I'm mostly concerned with the serial port, SPI port, I2C and PWM.  Are they hardware, or bit-banged?

How much overhead does Sketch add?  For example, most PicBasic Pro functions are about 80% as fast as pure assembly.

What is the instruction cycle time of the Atmel chips?  For example, a PIC runs at 200nSec/instruction.

What is the interrupt latency?  Also, how many interrupt priority levels are there?

Or - if someone could point me to a (hopefully single) source for the above information, I would be most appreciative.

13  Forum 2005-2010 (read only) / Troubleshooting / Re: Cant get SD card working on: January 22, 2011, 11:11:56 am
Thanks, Dave!  That worked.

14  Forum 2005-2010 (read only) / Troubleshooting / Re: Cant get SD card working on: January 21, 2011, 11:20:26 pm
I read on another post that the SD memory had to be formatted FAT16 and smaller than 2GB, so I set the partition size to be 1GB and formatted it as FAT16.

STILL no luck!  Could it be that the pin declaration file is wrong for my Mega 2560?
15  Forum 2005-2010 (read only) / Troubleshooting / Re: Cant get SD card working on: January 21, 2011, 09:09:15 pm
OK, I just bought a 16GB Class 10 micro SD card.  I get the same message -

Initializing SD card...Card failed, or not present


I could probably hook up a logic analyzer,  but before I do, is there anything else?
Pages: [1] 2