Skip to main content

Messages

This section allows you to view all Messages made by this member. Note that you can only see Messages made in areas you currently have access to.

Messages - Bertho

333
Breakout boards / Re: xQFP 0.40mm?
Not really, with 11 pins on a side (xQFP44), you are missing about 1mm wrong. With pin spacing at 0.4, you will be two pins off.
334
General discussion / Re: ENC28J60 and Buspirate
[quote author="ian"]Interesting discussion bertho and Sjaak.[/quote]
Thank you, I agree, an interesting discussion. There are so many funny aspects and kludges in tcp/ip that the discussions never end ;-)

[quote author="ian"]I did once take a stab at writing my own stack. I made some crude code that "did the job", but as you say it is difficult to do it right. Writing your own stack (or partial stack) certainly helps you understand and debug other people's stacks though.[/quote]

I see, you have felt the pain (don't know whether to congratulate or offer condoĺences).

I'm currently working on a project that uses multicast on a pic18f97j60 and did the work on a crude udp/ip stack (no tcp required for the project), so all the stuff is fresh in memory. Actually, I was planning to publish the project soon (couple of weeks probably) and announce it here. I could use some help too on a droid-app, if some are interested.

--
Greetings Bertho
335
General discussion / Re: ENC28J60 and Buspirate
[quote author="Sjaak"]Depending on icmp echo-reply is a bad thing since WindowsXP is introduced. Many clients wont reply to echo-request because of the standard fireewall. Which imho a bad way to try to cloak a device, and wont help with troubleshooting IP problems. It is true the DHCP server does use this mechanism.
A client can just send an ARP request without a valid src ip, which is still valid thing to do. The clients sends an ARP request using a layer 2 broadcast to the local LAN, trying to discover if anyone has his leased IP address.[/quote]

The point is that well-behaved clients do not respond to invalid ARP requests because it is an obvious attack vector. If a client sends an ARP with an invalid IP, either outside the broadcast domain or to self, then nobody is supposed to respond. So, just blindly sending ARPs will not help.

The DHCP server has a trick up its sleeve as long as it resides on the same broadcast domain when sending ICMP echo request. The DHCP server's IP stack will do an ARP request to resolve the target IP before sending the ICMP echo request. Even if the client does not respond to ICMP echo request, it /will/ respond to the ARP request. The DHCP server then simply looks at the local ARP cache and compares the MAC with the lease-requestor's MAC. If they differ, then the IP address is taken by another client and will not be given out. The corner case, if the DHCP server is not on the same broadcast domain is addressed in good DHCP relays. It should be noted that the DHCP protocol has problems wrt. duplicate avoidance. There is no way in IPv4 to solve all problems.

--
Greetings Bertho
336
General discussion / Re: SPI Signal, long cable and some questions
[quote author="michu"]-what kind of Imped­ance resistor (between gnd and clk) would you use?
-what kind of capacitor the clean out DC would you use?
-did I forget something important?
-other hints....[/quote]

Termination resistors need to be balanced between Vcc and GND. The classic TTL termination uses a 330R and a 220R resistor (330 to Vcc and 220 to ground) resulting in a 132R termination, assuming that the PSU impedance is low. If you only terminate to one side, then you may not be able to reach the required signal levels for '1' and '0'. Your termination resistors will depend on the line impedance you have. You can see reflections on a scope and you can tune the termination until the reflections are gone.

To drive long lines you need driver chips. Simple microcontroller outputs will normally not cut it. If you place many devices on a string or have long cables, then you need to ensure that the drivers can cope with the capacity of the line. The capacity is normally what limits the clock frequency. Rule of thumb says you have 100nF per km of cable (may be worse or better; see cable docs). It takes a lot of energy to drive capacitive loads. You also have signal degradation due to cable resistance. If you get to higher frequencies, you will encounter coaxial properties of the cabling and then you must ensure that the driving impedance matches the loading impedance and the terminating impedance (all must be equal).

Cutting in a string may introduce local reflections, which at high frequencies wreaks havoc. Intermediate taps should either be of infinite impedance (or close to invisible) or they must be terminated with the correct impedance. In the latter case you may need to have to add amplifiers to send the signal to the next stage.

The capacitance you need to add at the local tap's power depends on the load current variations and the cable resistance. The impedance of the power supply lines increases as you add more cable and that means you need to decrease the impedance locally with a polarized capacitor (order of 10..1000uF). The ESR of the capacitor should be low. How low depends on the load current changes. A second capacitor is a ceramic of ~100nF to short the high frequencies.

--edit--
You may also want to add a ferrite bead at each tap's power outtake. The effect of the inductance is that the rush-currents are damped and will not feed back as much. It also reduces the capacitance requirements at the local taps.

--
Greetings Bertho
337
General discussion / Re: ENC28J60 and Buspirate
[quote author="electronicsbasecom"]My self am looking for some good tutorial about it.. anyone know where to find it? definitely not a job that you can start that component working easily.. [/quote]

There is uIP available. Also not the easiest. but has a lot implemented.

Learning about the packet types and protocols is very hard and takes a lot of time. There is no shortcut and the learning curve is steep. The basics start with books; there is a classic three part TCP/IP series (can't remember who wrote it or what publisher, but the version I read had a white cover with red text on it many years ago).
Then there are the RFCs which describe all the details and are the reference for all of it. However, reading RFCs takes some getting used to as its language can be overwhelming.

Anyway, for a basic stack you need:
- ethernet packet driver (interface with hardware Layer2 MAC and Layer1 PHY)
- operational timer/clock infrastructure for timeouts
- ARP (IP to MAC mapping)
- IP
- ICMP (minimal implementation requires echo request/reply)
- UDP (for DHCP)
- TCP
All other protocols are layered on top of the stack.

Of all the parts, TCP is the hardest to implement because it requires a lot of client side state and administration.

--
Greetings Bertho
338
General discussion / Re: ENC28J60 and Buspirate
[quote author="Sjaak"]You need to check if your assigned ip adress is already in use (not mandatory, but good practise) there is alway a possibility someone made a static for your lease. duplicate ips will give funny results and unwanted networktraffic.[/quote]

Yes, but that is part of the DHCP server negotiation that should take care of that. A DHCP server is supposed to send an ICMP echo request to the to-be-leased IP address to make sure it is available. The client cannot do this as it is unconfigured at that point and must refrain from becoming the source of a duplicate. Sending an ARP whohas from the client cannot be done because the client must know its own IP address /before/ it may send the requests (the IP is part of the ARP packet) and any ARP reply is unicast (!).

--
Greetings Bertho
339
General discussion / Re: ENC28J60 and Buspirate
[quote author="Sjaak"]
- send arp discover for this ip adres (3x) process replies and in this case get new ip through dhcp
[/quote]

Why send an arp request for yahoo.com? You need to find the DNS server first, and you get that info from the dhcp server. If the DNS server(s) are in the broadcast domain, then you send arp to find it (normally as many times as you want to wait at intervals). If you need to address a client outside your broadcast domain, then you need to find your gateway's MAC.

--
Greetings Bertho
340
Project development, ideas, and suggestions / Re: Input for my frequency counter questions...
[quote author="alank2"]
http://pdfserv.maxim-ic.com/en/ds/MAX961-MAX999.pdf
[/quote]

This one is nice. The MAX961 is a specialized comparator with hysteresis. You still need at least filtering to get nice results, but it should be able to reach about 100MHz peak (maybe a little more). However, as warned, the price is according ($5..$8 single, ~$3.5 bulk). Making a layout to support small signals at high frequency, without getting into noise, will be a chalange and a breadboard may kill any nice signal. The hysteresis is only 3.5mV, so any noise will make hell.

[quote author="alank2"]
I have some of these on hand I was going to play around with:
http://www.ti.com/lit/ds/symlink/tlv2470a.pdf
You don't think they will be able to handle faster speeds?
[/quote]

The TLV2470 has a GBP of 2.8MHz and is very slow. You might press a few hundred kHz out of this one with appreciable amplification.
341
Project development, ideas, and suggestions / Re: Input for my frequency counter questions...
[quote author="alank2"]
The question is about the front end.  I've tried various input circuits, I've tried biasing inverters, schottky inverters, etc.  I want the input to support even measuring mains voltages if possible.  The problem with the circuits I've tried is that they don't amplify enough to get down to 50mV signals.  I was thinking about trying an opamp or a very fast comparator next, but I don't see opamps/comparators usually mentioned in the searching I've done for frequency counter input stages.  What advice do you guys have?
[/quote]

Just some thoughts:
1) Opamps are not fast enough if you need large signal gain. The gain-bandwidth product will simply not allow it. From 2..5MHz up you usually use discrete transistor/jfet amplifiers to get the signal to acceptable level. The cost of an opamp is somewhat exponential with the gain-bandwidth product. For (small) signals from 10..50MHz and up you will probably need specialized analogue amplifier design to get a good signal out.
2) Measuring mains is dangerous and you should use an isolation transformer on the input (50:1 or 100:1). You know the approx frequency anyway. Using transformer isolation is more difficult if you want to do it over a large frequency range, but still possible.
3) You put a (large) capacitor in the input-line to get the DC component off of the measurement source. This is normally a 1..2kV type for isolation purposes. You then add your own DC bias as required.
343
Open 7400 Competition / Re: New entry, but BB will not play
[quote author="Bertho"]Web-forms have a habit of not functioning.[/quote]

To quote myself,... The site has been down for several hours (at least seen from my location). So I guess that this might be a concern to take into account.

I do appreciate your concerns for spam received, boy do we all, but on the other hand, you did create expectations when publishing the contest. Making it (seemingly) hard to participate does not help your cause. All that said, I do think it is nice of you to organize the contest, so don't take my comments for something negative.

--
Greetings Bertho
344
Open 7400 Competition / Re: New entry, but BB will not play
[quote author="sqkybeaver"]you can send a pm to myself or Ian, and we can respond to let you know that we got it.[/quote]

I just tried and got:
Your message looks too spamy for a new user, please remove off-site URLs.

This "spamy message" is getting annoying. Maybe you could provide an old-fashioned e-mail address?

--
Greetings Bertho
345
Open 7400 Competition / Re: New entry, but BB will not play
Yes, that is fine. However, it would be nice to get a confirmation that the entry is sent and received.

The contact-form requires a valid email address, so I would expect to receive a "yes, thank you, got your message and we'll get back to you asap", especially with data that you want confirmed to be received, such as an entry in a contest. Web-forms have a habit of not functioning.

--
Greetings Bertho

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.01722451040session_write_close ( )...(null):0
20.01762582664ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.01762583440Database_MySQL->query( ).../DatabaseHandler.php:119
40.06432722200Database_MySQL->error( ).../Db-mysql.class.php:273