Show Posts
Pages: 1 [2] 3 4 ... 67
16  Using Arduino / LEDs and Multiplexing / Re: 74595 detail question on: August 05, 2013, 11:52:22 am
ok great - thanks.  I've also ordered a 74HC4094 which has a level rather than edge sensitive output register load so i can just leave it open.
17  Using Arduino / LEDs and Multiplexing / 74595 detail question on: August 05, 2013, 10:11:29 am
I'm using a 74hc595 as part of adding a high speed spi input to an old-school micro that only has parallel input.  My MISO is the 74595 serial input and the parallel outputs are gated onto the data bus with the /OE input.

looking at the 74595 data sheet here http://www.nxp.com/documents/data_sheet/74HC_HCT595.pdf the logic diagram shows that /OE is separate from the shifting and storage register functions but the transition diagram shows the shift register clocking into the storage register only when output is enabled.  I'm not sure whether this is just a consequence of how the part is usually used or an actual restriction.  Has anybody used the 595 in a similar way?

The logic and transition diagrams are attached.
18  Using Arduino / Networking, Protocols, and Devices / Re: Schematic Needed seeed ethernet v1.1 on: May 22, 2013, 12:10:54 pm
Thanks, i think you're right. The part about the mega explains the isp/ jumper business.
19  Using Arduino / Networking, Protocols, and Devices / Schematic Needed seeed ethernet v1.1 on: May 22, 2013, 09:41:28 am
I picked up a seeed stutio ethernet shield at radioshack for 19.99.  http://www.seeedstudio.com/depot/ethernet-shield-p-518.html


It works fine if I have it plugged in to an arduino but not if I connect it with jumpers.  I'm connecting gnd, 5v, reset, and pins 10-13.  I note that it has an ISP female header that plugs into the arduino male and i'm wondering if that is where it is getting its spi signals.  The ISP header's sck, miso & mosi are connected to 13, 12, and 11 on the arduino but seem to be isolated from them on the seeed shield.  I'm not sure why that's useful but then i'm not sure why it has an ISP connector!

I may just try jumpering to the isp but i'd rather look at the schematic first.
20  Community / Exhibition / Gallery / Re: Soldering a Mega48A - 32 micro BGA, 4mm x 4mm x 0.6mm, ball pitch 0.5mm on: April 28, 2013, 03:31:26 pm
Could you describe the process in a bit more detail? How did you put the solder paste on? Were you able to do the chip separately from the other smd parts?
21  Using Arduino / Programming Questions / Re: pointers - casting - what does this mean? on: April 24, 2013, 04:14:01 pm
Is it somehow different from sum += *(unsigned int*)ptr; Which is plenty ugly enough already.

Not much different.  The intent is to ensure the byte ordering.  With your expression, the byte ordering depends on the compiler / architecture.  With the other expression, the byte order is always the same (presumably "network order").

The (unsigned long) cast is strange.  Seems rather pointless given the facts that the value can never exceed 16 bits and it is followed by the (unsigned int) cast.  Oh well.

ah, I get it.  excellent point.
22  Using Arduino / Programming Questions / pointers - casting - what does this mean? on: April 24, 2013, 02:58:27 pm
I came across the following in the library for an ethernet module.  It's to do with calculating a checksum. 

I THINK it means: take the two bytes at the adrress in ptr as a 16 bit unsigned int and add them to the 32 bit signed integer sum but all the casting leaves me a bit boggled.

Code:
char * ptr;
long sum;
...
sum += (unsigned int) (((unsigned long)*ptr<<8)|*(ptr+1));

Is it somehow different from sum += *(unsigned int*)ptr; Which is plenty ugly enough already.
23  Development / Other Software Development / substituting another compiler for avr-g++ on: March 12, 2013, 08:51:37 am
I am really in the weeds here and any contribution would be gratefully accepted.

I am attempting to use the IDE with another compiler(LCC re-targeted for a 1970's microprocessor). 

At the moment, I'm just replacing the avr-xxx modules in  C:\...\arduino-1.0.3\hardware\tools\avr\bin with stubs that invoke my compiler.

My puzzle is a discrepancy between the commands the compiler displays and the parameters my stub says it's getting. 
For example - the IDE displays
Code:
C:\apps\arduino-1.0.3\hardware\tools\avr\bin\avr-g++
-c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega644p
-DF_CPU=1600000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=103
-IC:\apps\arduino-1.0.3\hardware\arduino\cores\arduino -IC:\apps\arduino-1.0.3\hardware\arduino\variants\standard C:\Users\bill\AppData\Local\Temp\build2832089004955701964.tmp\Blink.cpp
-o C:\Users\bill\AppData\Local\Temp\build2832089004955701964.tmp\Blink.cpp.o

but my stub sees
Code:
Command-line arguments:   argv[0]   C:\apps\arduino-1.0.3\hardware\tools\avr\bin\avr-g++,   
argv[1-13]=...   
argv[14]   -IC:\apps\arduino-1.0.3\hardware\arduino\cores\arduino,   
argv[15]   -IC:\apps\arduino-1.0.3\hardware\arduino\variants\standard,   
argv[16]   Blink.cpp,   argv[17]   -o,   argv[18]   Blink.cpp.o,]

i.e., the path information is missing from the input and output file names.  could this be transmitted some different way like an environment variable?  Seems unlikely but ...
24  Using Arduino / Networking, Protocols, and Devices / Re: Fetching 32 bits of Data over SPI on Arduino Due on: February 22, 2013, 10:54:30 pm
So try driving cs low and do 4 transfers. Just print them individually and see if they make any sense.

And sorry for not reading well enough, what do you mean your code won't compile?
25  Using Arduino / Networking, Protocols, and Devices / Re: Fetching 32 bits of Data over SPI on Arduino Due on: February 22, 2013, 10:11:37 pm
Ok. I don't have specific documentation but
1) usually you have to send a command to the device before it sends back your data
2) each transfer gets you 8 bits so you need 4, not 32.
3) you need to combine your 4 transfers to make your 32 bit long, something like
  data=data<<8+spi.transfer(cs)

26  Using Arduino / Networking, Protocols, and Devices / Re: Help with Heartbeat client code on: February 22, 2013, 08:00:39 pm
Can you find where in the library code the timeout is processed?
27  Using Arduino / Networking, Protocols, and Devices / Bit Bang SPI question on the receiving part. on: February 22, 2013, 05:27:31 pm
The code below works fine for a mode 0 device.  The device wants an idle byte between sending a read command and reading the result.
What puzzles me is that I have to start reading the result on miso BEFORE sending the 1st clock pulse for the third byte transmitted.  If I were using hardware spi I would just send the three bytes and the result would be in spdr.  i.e. the slave clocks out its 1st data bit on the falling edge of the 16th clock(the last clock of the 2nd byte).

Does this make sense and I'm over-thinking it?  Maybe the way to think about it is that the avr reads miso on the rising edge of the 17th clock (for hardware spi)?

Code:
  temp=cmd;
  for(i=0;i<8;i++){//first write the command
    digitalWrite(mosi,(temp&0x80));      //by setting mosi for each bit
    digitalWrite(sck,HIGH);              //then pulsing the clock
    digitalWrite(sck,LOW);
    temp<<=1;
  }
  for(i=0;i<8;i++){  //now we send 8 clock pulses while the enc thinks
    digitalWrite(sck,HIGH);
    digitalWrite(sck,LOW);
  }
  result=0;
  for(i=0;i<8;i++){  //now we read the data back
    result=(result<<1)|digitalRead(miso); //by grabbing miso for each bit
    digitalWrite(sck,HIGH);                //then pulsing the clock
    digitalWrite(sck,LOW);
  }
  return(result); 
28  Community / Bar Sport / Re: Where to get a Due or Raspberry Pi for Xmas gift on: November 30, 2012, 05:17:46 pm
I successfully ordered another Raspberry Pi from Newark (USA) yesterday. I have a tracking number so it's on its way.
Thanks a bunch - ordered one from newark canada.
29  Community / Bar Sport / Re: Where to get a Due or Raspberry Pi for Xmas gift on: November 30, 2012, 08:14:20 am
Unless there's a special reason that it HAS to be a  Due, or (shudder), Pi....
I dunno, I was assuming the relative had asked for a Due or Pi.

The relative in question is an experienced arduino user and a gadget freak.  He doesn't need another processor, this is a "for fun" thing - the Pi and the Due are the "ooh shiny" of the moment. 
30  Community / Bar Sport / Where to get a Due or Raspberry Pi for Xmas gift on: November 29, 2012, 07:52:28 am
As a christmas gift I'd like to get a relative either a due or a raspberry pi but everywhere I look seems to be back ordered.  Are these actually available or are they just trickling out?

I'm in Canada by the way.
Pages: 1 [2] 3 4 ... 67