spielwiese [PIC Mikrocontroller WIKI]
Mittwoch, 23. Mai 2012
 
 

Die kleine Testwiese ;-) <m> y = x+y</m>

Code Test_neu:

#include <16f877a.h>
#use delay(clock=4000000)
#fuses HS,NOWDT,NOLVP
 
 
#include <pcf8583.h>
 
 
enum BITSTELLE { Bit0=1,BIT1=2,BIT2=4,BIT3=8,BIT4=16,BIT5=32,BIT6=64,BIT7=128 };
 
void ZeitEinstellen(int8 Stunde, int8 Minute, int8 Sekunde)
	{
 
	}
 
void main()
{
struct Time zeit;
struct Date datum;
 
   set_tris_a(0);
   set_tris_b(0);
   set_tris_c(BIT0+BIT1+BIT2+BIT7);
 
   setup_adc_ports(NO_ANALOGS);
   setup_adc(ADC_CLOCK_DIV_2);
   setup_spi(FALSE);
   setup_counters(RTCC_INTERNAL,RTCC_DIV_2);
   setup_timer_1(T1_DISABLED);
   setup_ccp1(CCP_OFF);
 
 
 
   sek_vorher=60;
 
   zeit.hour = 14;
   zeit.minute = 32;
   zeit.seconds = 34;
   datum.year = 3;
   datum.month = 4;
   datum.day = 19;
   datum.weekday = 0;
printf("Hallo\n\r");
   write8583_rtc(&zeit,&datum,SET_DATE_TIME);
 
   while (1)
   {
     read8583_rtc(&zeit,&datum,GET_DATE_TIME);
 
     if (zeit.seconds!=sek_vorher )
     {
 
         printf("Zeit:  %02u:%02u:%02u\n\r",zeit.hour,zeit.minute,zeit.seconds);
 
         printf("Datum: %02u.%02u.%02u\n\r",datum.day,datum.month,datum.year);
         sek_vorher=zeit.seconds;
     }
 
   } // Ende while (1)
}

Mathetest <m>S(f)(t)=a_{0}+sum{n=1}{+infty}{a_{n} cos(n omega t)+b_{n} sin(n omega t)}</m>

Syntax Highlighting in ASM

;
;	File: Example.asm
;	This is the main file in the MPASM assembler/MPLINK linker example
;       Use with Example2.asm 
;       17 May 2004
;
 
	list	 p=16f84a
	#include p16f84a.inc
 
 
;   Set configuration bits using definitions from the include file, p16f84.inc
	__config	_LP_OSC & _PWRTE_OFF & _WDT_OFF & _CP_OFF
 
 
;   Set User ID Memory
	__idlocs	0x1234
 
 
 
PROG	CODE		; Set the start of code from 16f84a.lkr script
 
main			; Min code entry called from Example2.asm
	global	main	; Define as global so can be used in Example2.asm
	nop		; Main does nothing -- Put your code here
	goto	main	; Our sample "main" is just an infinite loop
 
service 		; Interrupt routine, called from Example2.asm
	global service	; Define as global so can be used in Example2.asm
	nop		; Interrupt code would go here
	nop
	retfie
 
 
	end

Verschiedene kleine Tests

Das ist eine Notiz zur Erinnerung!!!

Vorsicht Strom !!!

 
spielwiese.txt · Zuletzt geändert: 2010/04/28 07:33 (Externe Bearbeitung)
 
Falls nicht anders bezeichnet, ist der Inhalt dieses Wikis unter der folgenden Lizenz veröffentlicht:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki
 
Top! Top!