Show Posts
Pages: 1 ... 414 415 [416] 417 418 ... 591
6226  Using Arduino / General Electronics / Re: Building or use an interrupt controller. on: August 05, 2011, 11:27:14 am
The AVR chip already has pin change interrupts which give a similar functionality.

______
Rob
6227  Topics / Device Hacking / Re: Understanding RS232 data... on: August 05, 2011, 11:16:55 am
Another thing, are you sure you're synchronized with the data stream?

Is there a break in the data so the terminal prog can get in step?

Put another way, if you don't do anything do you still get data?

That could explain why this happens

Quote
i can see 7C a lot and then it desapears...

and also why the above patterns don't seem to have the same delimiters. Your data could be shifted by different amounts each time you look at it.


_____
Rob
6228  Topics / Device Hacking / Re: Understanding RS232 data... on: August 05, 2011, 10:57:53 am
Here's one possibility
Code:
C0 35 F9 FC 7C
C0 35 F9 26 F9 4A 34 F9 59 F9
C0 9C 94 DA 00 40 9D 4C DA 00 40 47 A4 B4 00 4A 89 7C 69 7B
C0 CD C7 26 00
C0 CD C7 26 00
C0 CD C7 26 00
C0 CD C7 26 00
C0 C5 C7 12 FC 4A 37 3B 67 FC 40 23 7E CA 00
C0 46 6E 94 00 40 13 62 94 00
C0 11 5E 94 00
C0 35 FC 8D 3E 4A 98 66 CA 00 40 11 84 9C 00
C0 26 CC 9C 00
C0 30 78 D1 1E
C0 9F 4F 15 1E 40
C7 CF 71 00 40
C7 CF 9B 1E 40 8E
CF 73 00 40 1C
CF 17 1E 40 8E 4F E6 00 4A 10 78 48 1E
C0 CE 47 8A 00
C0 39 3B D1 FC
C0 9E 3B CF FC
CA 89 47 13 FC

Not sure about the C7/CF/CA but maybe Cx is a command of some kind.

Keep it simple. No hovering in "diverse areas", or mucking around, one touch top left, one touch bottom right or something like that.

_____
Rob
6229  Using Arduino / Microcontrollers / Re: SPI as comms but also for ISCP Programming - How... on: August 05, 2011, 01:55:44 am
I've done a little research.

From AVR910 app note (http://www.atmel.com/dyn/resources/prod_documents/doc0943.pdf)

Quote
When Reset is applied to the target AVR microcontroller, the MISO pin is set up to be an input
with no pull up. Only after the “Programming Enable” command has been correctly transmitted
to the target will the target AVR microcontroller set its MISO pin to become an output. During this
first time, the In-System programmer will apply its pull up to keep the MISO line stable until it is
driven by the target microcontroller.

So it's as I thought and it looks like we're on reasonably solid ground.

It's probably worth having a good read through this.

_____
Rob
6230  Using Arduino / Microcontrollers / Re: SPI as comms but also for ISCP Programming - How... on: August 05, 2011, 12:45:45 am
As I see it, and totally untested of course...

Let's assume 5 processors in total.

All resets tied together.
All SCKs go to one side of a 2x5 header.
All SCKs pulled high with individual resistors.
Before programming pull all but one jumper.
When done put them back.

Could get a little tedious and there might be a better way (say with some logic, a 4-way analogue switch chip or something) but that's my first take on it.

Quote
All the other devices still have MOSI and MISO connected, so I assume since their SCK isnt connected, they dont sync to the data coming in, so they ignore it?
I also assume they dont try and send anything during the programming saying 'I cant understand!' etc... which could cause problems?
The others can't do anything, they are in a reset state. (assuming they ignore any MOSI data because they don't have SCK, a reasonable assumption I think but far from proven)

Quote
If the device being programmed is disconnected from SCK, then all the rest could still talk...
No, reset remember.

Quote
And a common ICSP connector between the 5 devices? So disconnecting the SCK from 4 of the devices will leave the ICSP connectors SCK being connected to the device being programmed.
Yep.

I'm reasonably certain it will work and so far nobody has thought otherwise, but I wouldn't get 50 boards made smiley

______
Rob

 
6231  Community / Bar Sport / Re: (yawn) on: August 05, 2011, 12:31:55 am
Quote
worst automatic white balance I've ever seen.
Yeah, I won't be getting one for my wildlife shots that's for sure smiley

______
Rob
6232  Using Arduino / Microcontrollers / Re: SPI as comms but also for ISCP Programming - How... on: August 04, 2011, 11:43:39 pm
Quote
would a floating SCK line cause problems?
Possibly, a pull up/down resistor should fix that.

______
Rob
6233  Topics / Device Hacking / Re: Understanding RS232 data... on: August 04, 2011, 11:28:19 pm
If you can't find the protocol definition (have you Goolged for it?) then you have to figure it out yourself.

It sounds like you have already made a good start, now you need to try and isolate the bytes that are sent as a result of various events.

For example watch the line until nothing is happening, then touch the upper left of the screen. Did a burst of data appear?  Touch the lower right and record the burst from that. Then look at the two lots of data and try to figure out the format. In this example you would expect maybe four bytes to hold the X and Y locations, they should be easy to see.

Hopefully every event produces the same basic format, just with different data. If so you should be able to start deciphering the contents of the data  "packets".

The line may not go idle between events, there may be other stuff going on all the time like a query to see if anything is there. As long as what's happening is stable and repeatable you can still differentiate between that and event data.

Can you post a few examples of the data?

______
Rob
6234  Using Arduino / Microcontrollers / Re: SPI as comms but also for ISCP Programming - How... on: August 04, 2011, 11:09:04 pm
I've already talked to Wanago about this offline but I'll post my thoughts here in the hope of generating more discussion.

I'm thinking that all resets should be tied together and SCKs jumpered to select the chip being programmed.

From the tiny84 (and all others I think) data sheet, the programmer will assert the reset signal then...

Quote
2. Wait for at least 20 ms and enable serial programming by sending the Programming Enable serial instruction to pin MOSI.

3. The serial programming instructions will not work if the communication is out of synchronization. When in sync. the second byte (0x53), will echo back when issuing the third byte of the Programming Enable instruction. Whether the echo is correct or not, all four bytes of the instruction must be transmitted. If the 0x53 did not echo back, give RESET a positive pulse and issue a new Programming Enable command.

This is what I remember seeing on the logic analyser. I suspect the chip being programmed doesn’t turn MISO into an output until it sees the 0x53 on MOSI. So if you jumper SCK only one chip will ever see the 0x53 and it will be the only one that turns its MISO into an output.

All others will remain in a reset state and blissfully unaware of what's going on.

______
Rob
6235  Using Arduino / Networking, Protocols, and Devices / Re: Time ! on: August 04, 2011, 11:02:42 pm
As long as you only write the time/date to the RTC under operator control or some other similar event you should be OK.

How DO you set the time/date?

______
Rob
6236  Using Arduino / Programming Questions / Re: Reading in binary through serial on: August 04, 2011, 10:59:58 pm
One problem you have is the storeString  variable is local, it will be initialized every time loop() runs.

Either move it out with the other globals or make it "static".

______
Rob
6237  Development / Suggestions for the Arduino Project / Re: Arduino 1.0 beta Serial.flush() ?? on: August 04, 2011, 08:40:10 pm
Quote
flush() now waits for the output buffer to empty.
That's ludicrous, interrupts or no interrupts something called "flush" should do just that, and I see no reason it shouldn't.

I can see a good reason for a function that waits until the buffer is empty, but it should not be called "flush" especially when it overloads an old function with the same name but totally different functionality.

______
Rob
6238  Development / Suggestions for the Arduino Project / Re: Arduino 1.0 beta Serial.flush() ?? on: August 04, 2011, 07:12:23 pm
That seems pretty strange, how would it ever return if no chars are received? And if chars are received you'd have to wait for the buffer to fill.

That can't be right.

The old flush did this

 _rx_buffer->head = _rx_buffer->tail;

______
Rob
6239  Community / Bar Sport / Re: (yawn) on: August 04, 2011, 06:55:15 pm
Quote
Someone mention cat doors and overkill?
"Flo control" I love it smiley

That's gotta be the smartest cat door I've ever seen.

______
Rob
6240  Community / Bar Sport / Re: Suggest to a neon sign company. on: August 04, 2011, 09:44:42 am
Quote
Would it even be worth spending the money.
Well not to me it wouldn't. How are we supposed to know if it's worth it to you smiley

As for a company to make one, sorry I've no idea.

______
Rob
Pages: 1 ... 414 415 [416] 417 418 ... 591