Show Posts
Pages: 1 ... 7 8 [9] 10 11 ... 15
121  Using Arduino / Project Guidance / Re: Getting started with microprocessors on: August 15, 2012, 10:19:22 am
I didn't even realize they made microcontrollers that fast! Maybe there's really no point in switching over to microprocessors then, I might just buy a STM32F407VG or something seeing as it runs at 3.3v, and it has SDIO and I2S (both of which would be highly beneficial). I just looked through the STM32F4 series datasheet and it seems to have both JTAG and something called serial wire debug (SWD). From what I've read so far this SWD seems to have just a single clock and data pin like PDI. Is it compatible? Alternatively I could probably make some sort of JTAG programmer with an ATmega16u2 I have laying around. I'd need to read up on it though.

EDIT:
Quote
all dev tools are free
I just looked and it seems that they are all either 30 day trials or have a code size limitation. What specifically are you talking about?
122  Using Arduino / Project Guidance / Re: Getting started with microprocessors on: August 15, 2012, 08:47:25 am
Wow, thanks for all of the replies, I wasn't expecting that many. I suppose I had better explain my goal though as I didn't really mention it in the beginning.

Eventually I would like to use an ARM in an embedded design like a tablet/iPod touch/palm Pilot etc. Recently I have finished working on such a device using an ATxmega256D3 but it simply doesn't have the speed I want, and as far as I can tell, moving onto microprocessors will give the speed that I require. My first thought was to buy an ARM microprocessor but I quickly realized that it's far more complex to use than a simple microcontroller. So as a beginning step I decided I would try out something like a Z80 just to get familiar with microprocessors (assuming today's ARM architecture is anywhere near the same), hence this thread. Now for all I know, (which isn't much when it comes to microprocessors) starting with an ARM microprocessor might be just as easy as starting with a Z80. If so, does anyone know of an open source ARM dev board which I can get the gerbers for and etch at home? I've seen a few dev boards around but they cost $30 not counting shipping so I'd much rather just make one myself. But then there's still the question of uploading code. I'm guessing ARM uses a JTAG interface which I don't have a programmer for, but I've heard that one can bitbang it through a parallel port. Is this a viable option?
123  Using Arduino / Project Guidance / Getting started with microprocessors on: August 15, 2012, 05:13:45 am
I'm not sure if this is the right place to post this question seeing as it's not really a physical project, but it seemed to be the best suited part of the forum.

So I'd like to start moving away from microcontrollers and begin working with microprocessors instead, seeing as they seem to be the next step up. Unfortunately, I'm at a loss as to where I should start. While a microcontroller has everything it needs to function inside of a single chip, a microprocessor needs external RAM, ROM, UART, etc. which is where the trouble lies. It seems that the Zilog Z80 family seems to be a good, simple place to start but I haven't searched around much. Basically I'm looking for a tutorial that shows how to choose and hook up external RAM and ROM, and more importantly, how to write programs (assembler I'm guessing) and how to upload these programs into the ROM chip.
124  Using Arduino / General Electronics / Re: Minimum input current for a reliable reading? on: August 10, 2012, 09:11:25 pm
The shipping rate baffles me for sure. According to the digikey box, it's being shipped from over 2000 miles away!
125  Using Arduino / Programming Questions / Re: quickly "reversing" a byte? on: August 10, 2012, 06:15:21 am
Unsigned long long's? I didn't even know they existed! Also, thanks for the code Tom, now I won't have to write the whole lookup table.

EDIT: @AWOL My original thought was that maybe there was a command that could do just that, connect pin 0 of a port to pin 7, pin 1 to pin 6 etc. I'm actually using an ATxmega256D3 rather than an ATmega which has a lot of stuff built in that I don't even understand, so maybe it's still possible?
126  Using Arduino / Programming Questions / Re: quickly "reversing" a byte? on: August 10, 2012, 03:56:36 am
Cool, maybe someday I'll be able to figure all that out by myself. So a lookup table it is then. The way I currently have my setup wired, it takes 2.2 seconds to do a certain operation. In order to make the wiring far neater and easier, I'm going to have to reverse the way they connect to the ports, hence this post. In one of these 2.2 second operations I'm going to have to reverse 153600 bytes, so it better be fast! smiley-grin If you say that a lookup table is faster than 4.5 uS then that will add less than half a second onto the time, which is acceptable.
127  Using Arduino / Programming Questions / Re: quickly "reversing" a byte? on: August 10, 2012, 02:30:08 am
It does indeed work, although I haven't a clue as to how you came up with it smiley. However, bitshifts and bitwise operators take a clock cycle each so this would take at least 13 cycles. I still don't know how long the code I posted above would take so this might actually be faster. I need an assembly guru to look at the code.
128  Using Arduino / Programming Questions / Re: dealing with 8 bit rollover on: August 10, 2012, 02:11:59 am
This might not be possible depending on how many pins and interrupts you have free, which pins are taken, etc. but I would try to trigger a "both edge" interrupt with the LSB of you parallel interface. In the interrupt routine you would increment variable x. Then when you decide to read the value of the parallel interface, you would do some simple calculations to find out whch way you turned the knob.

Example: knob was at 10, which is stored in variable oldInput, turned 11 click backwards to 255, this is stored in newInput. This means the interrupt would have fired 11 times and you would have 11 in x. Then all you do is 2 if statements. Code:(not tested)
Code:
if (oldInput - x == newInput){//255, correct
    dir = backwards;
}else if(oldInput + x == newInput){//21, incorrect
    dir = forewards;
}
oldInput = newInput;
x = 0;//reset it for a new calculation
oldInput and newInput should be unsigned bytes, x can be a volatile int. There's probably an easier way to do it but this is the first thing that came to mind.

EDIT: You didn't say which arduino you're using, so I'm assuming it's an Uno. The only interrupts are on PD2 and PD3 so you won't be able to hook up the parallel interface with pin 0 to PD0, pin 1 to PD1 etc., as the LSB (pin 0) would have to be on PD2 or PD3. This could be easily fixed in software though so the idea is still feasible.
129  Using Arduino / Programming Questions / Re: quickly "reversing" a byte? on: August 10, 2012, 01:38:29 am
Something like this?
Code:
char rev[256];

rev[1] = 128;
rev[2] = 64;
rev[3] = 192;
...

var = rev[var];
...

I hadn't thought about doing it that way. I don't know a single thing about assembly or how a compiler would assemble that code, but my guess would be that it would need to put rev[y] into a register out of memory (LDS? 2 cycles?), and then store it into var (STS? 2 cycles?). There seem to be a few version of STS and LDS which take either 1 or 2 cycles. Not sure which one is used in this case. 256 bytes of RAM is no problem but this solution isn't very elegant. I found an instruction called SWAP which swaps the nibbles of a byte so I'm sure there's an instruction to swap every single bit. Can't find it though...
130  Using Arduino / Programming Questions / quickly "reversing" a byte? on: August 10, 2012, 12:58:36 am
Is there a very fast way to "reverse" a byte? Like turning 01110010 into 01001110 where bit 0 goes where bit 7 was, bit 1 goes where bit 6 was etc. I could do it in a loop of course but I'm looking for an alternative that only takes a few clock cycles. I'm sure that one of the many instructions can do this in just a few cycles, but I have no idea which one it is.
131  Using Arduino / General Electronics / Re: Minimum input current for a reliable reading? on: August 09, 2012, 08:00:13 pm
Well seeing as my patience is exceedingly low, I can rarely wait 2 and a half weeks for a Tayda delivery (even though it's cheaper overall) when digikey can ship overnight for $8. Never tried dipmicro though, I'll have to check them out.
132  Using Arduino / General Electronics / Re: what is that? on: August 09, 2012, 08:05:28 am
My only guess (and it's pretty far-fetched) is that whenever the oscillator turns on (1/60000 second) the resulting plasma pushes other particles away from the electrodes. Eventually they bounce around and line up into 11 stripes between the electrodes. Basically visible harmonic vibrations. I hope that's the answer because that would be awesome. Try changing the frequency if possible, they might go away.
133  Using Arduino / General Electronics / Re: Minimum input current for a reliable reading? on: August 09, 2012, 06:20:08 am
Alright then, I'll have a capacitor to ground as well. Seeing as the voltage will change less than 1 volt per hour there shouldn't be any problem with a 1uF cap or even higher, correct? I seem to be running out .1uF caps!
134  Using Arduino / General Electronics / Re: Minimum input current for a reliable reading? on: August 09, 2012, 06:05:35 am
That's what I figured. But how low is past the point of "not important at all"? Would you say 50uA is good enough?
135  Using Arduino / General Electronics / Minimum input current for a reliable reading? on: August 09, 2012, 05:48:03 am
I'm going to be monitoring battery voltage and other voltages which are higher than the MCU's Vcc for my next project. Therefore I'm using a simple voltage divider to get the voltage down to an acceptable level. Of course, I'd like to waste as little power as possible in the divider so I need to know what the minimum input current to the ADC is so that I can adjust my resistors accordingly. The conversions will take place once a second if it makes a difference. I've already tested and found that less than 30uA is sufficient for digital inputs but I'm not sure about analog inputs.
Pages: 1 ... 7 8 [9] 10 11 ... 15