![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| Haas Mills Discuss Haas machinery here! |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#13
| |||
| |||
| 080202-1214 EST USA Hu: If you do not use Xmodem but simply use the simple 1 bit parity check that is available in modren UARTs, then you will never detect a loss of a whole character or characters. The 1 bit parity check applies only to an odd number of bits in error within a character. If precisely a whole character is lost, then there are no bits and nothing to be checked. Therefore no error. The Wikipedia discussion is good, but lacking in detail. The basic original Xmodem uses a data block of 128 bytes of data, and attached to this block are a header and trailer. This entire group is called a packet. Errors are detected by use of a checksum. Correction is by a request to resend a packet. The checksum method has problems as does simple parity. First consider a 1 bit parity check. For example the number 5 is stored in ASCII as 35h (hex) or 00110101b (binary) (an 8 bit word). The modulo 2 sum of these bits is 0 so the parity bit is 0. What is actually transmitted by the UART in an asynchronous communication with 8 data bits, parity, and 1 stop bit is Code: 111111111111111 the rest state no data being transmitted.
0 the start bit
1 the least significant bit.
0
1
0
1
1
0
0
0 the parity bit (assuming we are using even parity,
it would be 1 for odd parity)
1 the stop bit
at this point a new word (character) could start Now consider the use of a checksum. Here all the bytes in the packet are added together modulo 256 (because we have an 8 bit word and this can represent 256 items). Many kinds of 1 bit errors or multiple bit errors per character can occur and cause the checksum to be in error. However, a few kinds of 1 bit errors can occur that a parity check would catch but the checksum will not. For example: two bytes are 5 and 4 (00110101 parity bit is 0 and 00110100 parity bit is 1) the sum of the two is 9 (00111001). Produce just the right 1 bit error in each of these such that 5 becomes 4 and 4 becomes 5, then there will be a parity error on each of these, but the checksum is still 9 so no checksum error. You must keep in mind the relative probablity of errors of certain types determines which method is better. Since in general with the correct interconnect equipment from one RS232 port to another, such as our I232 System, there are virtually no bit errors in 100s of millions of bytes sent it means that Xmodem can be a very effective error detector. In addition Xmodem has the ability recover from an error that the simple parity check can not. But the single bit parity check combined with Xmodem can be even better. For those that do not understand what I said ask questions. . Last edited by gar; 02-02-2008 at 03:02 PM. |
|
#16
| ||||
| ||||
| I only became acquainted with the term modulo in the last few years. In school we called it 'the remainder'. Its still kind of foreign to me though. Maybe I need to sue some jackass in the school system for protecting me from that nasty, foreign sounding word Oh, that's right, they're all dead now, I'm that old
__________________ First you get good, then you get fast. Then grouchiness sets in. (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management) |
|
#17
| |||
| |||
| 080202-2029 EST USA From The American Heritage® Science Dictionary modulus A number by which two given numbers can be divided and produce the same remainder. From The American Heritage® Dictionary of the English Language, Fourth Edition modulo Mathematics With respect to a specified modulus: 18 is congruent to 42 modulo 12 because both 18 and 42 leave 6 as a remainder when divided by 12 and mod abbr. Mathematics modulus So if you do arithmetic base 10 MOD 16, then the only possible numbers are the integers 0 thru 15. When you add 1 to 15 that is 16, or 0 (MOD 16). 15 plus 22 is 37 or 5 (MOD 16). 37(2*16) = 32 + 5. Some times this is called clock arithmetic. What is neat in binary arithmetic is MOD 256 is the least significant 8 bits of a number. To create a one byte (8 bits) checksum we simply initiallize an 8 bit register to 0, then add to that register and ignore the carries. . |
|
#18
| ||||
| ||||
Can you give a longhand example in binary of what the above quote would entail?
__________________ First you get good, then you get fast. Then grouchiness sets in. (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management) |
|
#19
| |||
| |||
| 080204-0815 EST USA Hu: Suppose we have a register CX that is 16 bits wide and we use the INC and AND functions as follows: INC CX AND CX, 00FFh ; 00FFh = 255 decimal = 0000000011111111 binary If CX contains 00FF before increment, then it is 0100 after INC. The AND function, which could be called a mask here, will cause CX to contain 0000h after its execution. Thus, with these two instructions we have created a modulo 256 decimal counter. This can be useful in a circular buffer application where the buffer size is 256 decimal. The value in CX would be combined with a base address to point into the buffer. On a production line I use a MOD 1024 counter (10 bits --- 3Fh for the mask) to provide a number that is not too large, but considerably larger than the maybe 80 parts within the line. Thus when we want to track a part down the line the operator can write a relatively simple number on the part. (edit) In the case of the 8 bit register, suppose we increment AX, but only use the results in AL, then with only one instruction I have done the same operation as with two instructions above. But normally you would not use AX as a counter. Continuing to increment AX above 255 puts stuff into AH but we ignore this by just looking at AL. (end edit) . |
|
#20
| |||
| |||
|
| Sponsored Links |
|
#21
| ||||
| ||||
| i don't know about pennies but if you look at the processor you will see a bunch of open solder joints for memory usually on the top left of the board you will notice the bank of chips they are all the same they are your memory chips 256k chips maybe take the number off the chip and do a web search you will usually come up with a hit a did it not too long ago for a quote and the chips were readily available but i decided against the job because of magnifying glass and real close solder didn't want to chance recking the board and if i did i would be buying a new one upwards of $2500.00
__________________ REYTECH Machine Service Corp. CNC repair NY, NJ http://www.reytechmachine.com |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| HAAS SL20 and HAAS VF2 ProE Posts? | CNC_student | Post Processor Files | 5 | 07-10-2008 02:46 PM |
| need more memory | rob2424 | Machine Problems, Solutions , Wireless DNC, serial port | 1 | 01-28-2008 05:04 AM |
| M-2 Memory | newguy81 | Mazak, Mitsubishi, Mazatrol | 2 | 09-05-2007 01:13 AM |
| Extended memory for a Haas VF3 | bob1112 | Haas Mills | 0 | 05-03-2007 02:41 PM |
| 88 Memory ? | Bear | Fadal | 2 | 09-01-2006 06:26 AM |