Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h> // Standard Ein-/Ausgabefunktionen
- #include <at89C51cc03.h> // CC03er-Grundregister
- void initSerial(void)
- {
- SCON = 0x52; // 9600 Baud, 8 Datenbit, 1 Stopp-Bit, asynchroner Betrieb,
- TMOD |=0x20; // keine Parit?tspr?fung.
- TH1 = 0xfd; //
- TR1 = 1; // Datenuebertragungs-Parameter ?bernehmen
- TI = 1; // nichts uebertragen
- }
- void main(void)
- {
- initSerial();
- ADCF = 0xc0;
- ADCON = 0x20;
- while(1)
- {
- ADCON = (ADCON | 8);
- while((ADCON & 16) == 0);
- {
- }
- ADCON=ADCON&(255-16);
- if(16&b>0)
- {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement