Pages

Tuesday 24 April 2012

RS232 connection problem - Soved after some Googling..

What is the difference between an RS232 DTE and DCE port?
How can I tell what kind of port my serial device has?
What are examples of equipment that has a DTE port?
What are examples of equipment that has a DCE port?
The RS232 spec references two kinds of device, DTE (Data Terminal Equipment) and DCE (Data Computing Equipment).  Click here for detailed information on the differences between these two kinds of connectors.
Here are some helpful guidelines to tell them apart:
1) On DB serial connectors check if pin 2 is an input or an output.  There are different rules for DB25s and DB9s.
DB25:
If pin 2 is labeled TX and is an OUTPUT the connector is DTE
If pin 2 is labeled TX and is an INPUT the connector is DCE

DB9:
If pin 2 is labeled RX and is an INPUT the connector is a DTE
If pin 2 is labeled RX and is an OUTPUT the connector is a DCE
This is helpful in most cases, but it is a de-facto standard and may not always apply.

2) A rule of thumb for DB9 and DB25 connectors is: If it's male it is likely to be a DTE, if it's female it's likely to be a DCE.
This is a good place to start if you have no documentation on the serial device.  There are many cases where this does not apply, for instance most serial printers have a female DB25 connector, but they are DTEs.
The only way to find out for sure what kind of connector a particular serial device has is to check it's documentation or contact it's manufacturer and ask.
In the worst case you may need to put a breakout box between the Lantronix product and the serial device and manually swap connections between pins until you find a connection that works.  See the FAQs at the links below for information on common cable configurations.
Examples of products that usually have DTE ports are terminals, printers and the COM ports on a PC.
An example of a product that usually has a DCE port is a modem.

For more detailed information on RS232 serial wiring please click here.

For cabling information for most Lantronix products with RJ45 serial ports click here.

Sunday 8 April 2012

How to calculate Net Run Rate (Cricket)

Net Run Rate (NRR) is a statistical method used in analyzing team work and/or performance in the sport of cricket. It is the most commonly used method of ranking teams in limited overs league competitions, synonymous to the goal difference in association football.
The net run rate in a single game is the run rate per over that a team scores, minus the run rate per over that is scored against them.

Step by step explanation

A team's run rate (RR) is their total number of runs divided by overs faced. As an over is made up of six balls, each ball counts for 1/6 of an over for the purposes of calculating the net run rate, despite being normally written in cricket's notation as .1 of an over.
So if a team scores 250 runs off 50 overs then their runrate is \frac{250}{50} = 5. If they got that same score off 47.5 overs, their RR would be \frac{250}{47\frac{5}{6}} \approx 5.226
The concept of net run rate involves taking the opponents' final run rate away from the team's run rate. The only complication is that if a team is bowled out, it is not the balls faced which their score is divided by; instead the full quota of overs is used (e.g. 50 overs for a One Day International and 20 overs for a Twenty20 match).
Usually, runs and overs bowled are summed together throughout a season to compare teams in a league table, as the following formula shows-
\mbox{net run rate }=\frac{\mbox{total runs scored}}{\mbox{total overs faced}}-\frac{\mbox{total runs conceded }}{\mbox{total overs bowled}}

Scenarios

All scenarios assume One Day International rules with 50 overs per side.
1. Side that bats first wins
  • Team A bat first and set a target of 287-6 off their full quota of fifty overs. Team B fail in their run chase, early losses causing them to struggle to 243-8 in their 50 overs.
  • Team A's runrate is \frac{287}{50} = 5.74
  • Team B's runrate is \frac{243}{50} = 4.86
  • Team A's NRR for this game is 5.74 − 4.86 = 0.88 Assuming this was the first game of the season, their NRR for the league table would be +0.88.
  • Team B's NRR for this game is 4.86 − 5.74 = −0.88. If this was the first game of the season, their NRR for the league table would be −0.88.
2. Side that bats second wins
  • Team A bat first and set a target of 265-8 off their full quota of fifty overs. Team B successfully chase, getting their winning runs with a four with sixteen balls (2.4 of the 50 overs) remaining, leaving them on 267-5.
  • Team A's runrate is \frac{265}{50} = 5.30
  • Team B faced 47.2 overs, so their runrate is \frac{267}{47.33}  \approx 5.64
  • Assuming that Team A and Team B had previously played as in the game in scenario one, the new net run rate for team A would be \frac{287+265}{50+ 50}-\frac{243+267}{50+47.33} = \frac{552}{100}-\frac{510}{97.33} \approx 0.28
3. Side that bats first is bowled out. Side batting second wins.
  • Team A bat first and are skittled out for 127 off 25.4 overs. Team B reach the target for the loss of four wickets off 25.5 overs, scoring a single to win the game and end with 128 runs.
  • Despite Team A's runrate for the balls they faced being 127 / 25.667 = 4.95 (2dp) because they were bowled out the entire 50 overs are added to their total overs faced tally for the tournament, and Team B are credited with having bowled 50 overs.
  • Team B actually scored at a slower pace, however they managed to protect their wickets. Thus, only the 25 .(5/6) overs are added to the seasonal tally.
4. Side that bats second is bowled out. Side batting first wins.
  • Team A bat first and set a formidable 295-7 off their complement of 50 overs. Team B never get close, being bowled out for 184 off 35.4 overs.
  • As in scenario 2, 295 runs and 50 overs are added to Team A's tally.
  • However, Team B, despite facing only 35.4 overs, have faced 50 overs according to the NRR calculations, and Team A have bowled 50 overs.
5. Both sides are bowled out, the team batting first therefore taking the points.
  • Team A bat first, and manage 117 off 24 overs on a difficult playing surface. Team B fall agonizingly short, reaching 112 off 23.3 overs.
  • In this case, both teams get 50 overs both faced and bowled in the overs column for the season, just as in example 1.
6. The game ends in a tie
  • Runs and overs are added as in the examples above, with teams bowled out being credited with their full quota of overs. Thus, the net run rate will always be zero for both teams.
7. Interrupted games with revised targets.
  • In matches ware set due to interruptions which reduce the number of overs bowled, those revised targets are used to calculate the net run rate.
  • For example, in a 50-over World Cup first-round group match, Team A are dismissed for 165 in 33.5 overs.
  • Team B progresses to 120-0, but play is halted after 18 overs due to rain.
  • Six overs are lost, and the target is reset to 150, which Team B reach comfortably after 26.2 overs with only 2 wickets lost.
  • Because the target was revised, 6 overs were lost and Team A were bowled out, Team A's total is reset to 149 after 44 overs, thus their RR =  
 \frac{149}{44} \approx 3.39. Team B's RR, however, is computed as normal: \frac{150}{26.33}  \approx 5.70.
  • Computing the match NRR for Team A gives us 3.39 - 5.70 = -2.31. Team B's NRR is: 5.70 - 3.39 = 2.31.
8. Abandoned games recorded as No-Result.
  • Abandoned games are not considered, whatever the stage of the game at stoppage may be, and the scores in such games are immaterial to NRR calculations.

How is the NRR calculated when there is more than one match in a tournament? Most of the time, in limited over cricket, there may be round-robin match among several teams. In that case the NRR is not the average of the NRRs of all the matches played. It is calculated considering the rate at which total runs are scored for and against (in entire tournament.)
Let's take as an example South Africa's net run-rate in the 1999 World Cup. South Africa's listing in the Group A points table published in the group stages was as follows:
Pakistan
P W L NR T Pts Net-RR For Against
3 3 0 0 0 6 +1.495 678/147.2 466/150

The columns we are looking at here are the last three: "Net-RR", "For" and "Against". The figure in the "Net-RR" column is achieved by subtracting the answer of the division in the "Against" column from the answer to the division in the "For" column.
To use this example:

FOR
South Africa had scored, so far in the tournament:
Against India, 254 runs (for 6 wkts) from 47.2 overs Against Sri Lanka, 199 runs (for 9 wkts) from 50 overs Against England, 225 runs (for 7 wkts) from 50 overs
Across the three games, Pakistan scored 678 runs in a total of 147 overs and 2 balls (actually 147.333 overs), a rate of 678/147.333 or 4.602 rpo.

AGAINST
Teams opposing Pakistan scored: India, 253 (for 5 wkts) from 50 overs. Sri Lanka, 110 all out from 35.2 overs. England, 103 all out from 41 overs.
In the case of Sri Lanka and England, because they were all out before their allotted 50 overs expired, the run rate is calculated as if they had scored their runs over the full 50 overs.
Therefore, the run-rate scored against Pakistan across the first three games is calculated on the basis of 466 runs in a total of 50 + 50 + 50 = 150 overs, a rate of 466/150 or 3.107 rpo.

NET-RR
The net run-rate is, therefore,
  4.602  Run-rate for 
  3.107  Run-rate against 
  ===== 
+ 1.495  
  ===== 


References:- 

Wikipedia
Cricinfo

Saturday 7 April 2012

Holey Optochip...!!!! IBM hits a terabit of info per second


A look at the IBM Holey Optochip, a new chip architecture capable of transferring a terabit of information per second.
 
(Credit: IBM)

IBM said this evening that its scientists have developed a computer chip that can move a trillion bits of information a second.
Known as the "Holey Optochip," the prototype optical chipset can transfer the equivalent of 500 high-definition movies a second, or the entire U.S. Library of Congress Web archive in an hour, Big Blue said. The innovation is possible because IBM's scientists figured out that, by drilling 48 minuscule holes in a standard quarter-inch silicon CMOS chip, they were able to ramp up data transfer rates from what was possible.

And by breaking through the terabyte-per-second barrier, the Holey Optochip is capable of data transfer at up to eight times the speed of today's parallel optical components, IBM said. The company plans to show off its research on the new chip at the Optical Fiber Communication Conference in Los Angeles tomorrow.
IBM said the Holey Optochip module "is constructed with components that are commercially available today, providing the possibility to manufacture at economies of scale."

And that's important, the company said, because major advances in data transfer rates are being driven by a vast increase in the number of applications and services that send large amounts of data over consumer and enterprise networks. And by moving to an optical networking architecture, IBM said, networks benefit from the speeds offered by using light pulses rather than electrons being sent over wires. 

In addition, the new chip offers computer makers energy efficiencies previously unavailable to them, IBM said. "Consistent with green computing initiatives, the Holey Optochip achieves record speed at a power efficiency...that is among the best ever reported," the company said in a release. "The transceiver consumes less than five watts; the power consumed by a 100 watt light bulb could power 20 transceivers. This progress in power efficient interconnects is necessary to allow companies that adopt high-performance computing to manage their energy load while performing powerful applications such as analytics, data modeling, and forecasting." 

For more details visit Cnet

Courtesy:- Cnet News