??? 02/10/06 15:09 Read: times |
#109715 - Decimal switches - how to start C Responding to: ???'s previous message |
I think the both are the same? Both code the number as BCD? Then, both should have four wires which are '1', '2', '4' and '8' and both should have a wire that's called 'common'. This is the one which connects the four switches '1', '2', '4' and '8' to ground. A look at datasheet of decimal key can help.
Decimal switches come in 3 versions; BCD, grey code and 11 pin. I think it was Andy who gave you a link to the original instruction set of 80C51 family. At the beginning of this instruction set there's a table, where each instruction is listed with number of needed bytes and oscillator periods needed to execute. I have seen no 12-clocker that does not match, but beware, the reduced clock cycle derivatives have different cycle count for some instructions. A little terminology lesson: for the 12 clocker 12 clocks form one instruction cycle and the instructions take a varying number (1-4) of "instruction cycles" to execute. All instruction use a whole number of instruction cycles. Also, i would like to know what things need to be studied for writing codes in C or Keil uvision2 (C51 compiler). what are all the topics i should be knowing. 1) "the bible" if you know C skip 2) 2) C for the PC a good self study book would be Kochan: Programming in C, 3rd Edition 3) the uvision getting started guide DO NOT skip 2) if you are not reasonably fluent in C i.e., will learning the architecture of a particular micro alone will be enough (or) should i be proficient with the instruction set also, ..e.t.c., You should intensively learn one certain micro, you want to work with in the next future. This could be the AT89S52 for instance, Erik might recommend you the LPC9xx series from philips. Try to become familiar as much as possible with the architecture and the instruction set of this micro. For a beginner I will recommend the SILabs f00 or f12 devkit ($99 - up). It comes with eval tools and an ICElike debugger. I, for one, see an enormous advantage for a beginner to able to "look under the hood". This often depends on personal taste. Mahmood for instance is coding everything in C. Others do everything in assembler. and I use a mix. One word about assembler: It is an enormous advantage to know it. as Kai said "I think it's never a bad idea to learn coding in assembler, because it supports the learning of architecture of micro." Erik here are the links to "the bible" Chapter 1 http://www.semiconductors.philips.com/acrobat/v...ARCH_1.pdf chapter 2 http://www.semiconductors.philips.com/acrobat/v...UIDE_1.pdf chapter 3 http://www.semiconductors.philips.com/acrobat/v...WARE_1.pdf |