chiark / gitweb /
start if i2c program
authorceb <ceb>
Sun, 23 Jan 2005 23:50:48 +0000 (23:50 +0000)
committerceb <ceb>
Sun, 23 Jan 2005 23:50:48 +0000 (23:50 +0000)
added PIC ID info into README.protocol

cebpic/README.protocol
cebpic/i2c-test.asm

index f97fa8a3787fdeff0a2c43072e3ce307544eb2b9..5b5582ccc90b4f14ea6034a8a5e2488d9b9498ca 100644 (file)
@@ -1,3 +1,6 @@
+NMRA
+====
+
 NMRA packets from the computer to the PIC should consist of 8-bit bytes.
 
 bits 6-0 contain the data to be sent to the track
@@ -13,3 +16,13 @@ Messages longer than this will cause things to get confused at the moment.
 baud rate 9600
 most significant bit first
 8n1
+
+
+Flash memory
+============
+
+Byte 20 0000h bit 0 is 1 for the main PIC and 0 otherwise
+
+
+I2C
+===
index 901e6cb098eb0dd183193907e5c0f570a6c856bb..baffa73e50ad7f5103365f193650197246f9766f 100644 (file)
@@ -106,6 +106,26 @@ initialise
        bcf     IPR1,5,0        ; set to low-priority interrupt
 
 
+;----------------------------------------------------------------------------
+
+; i2c setup
+
+; p68
+; p314
+; p 275 ID locs
+
+; test whether master PIC (location 20 0000h bit 0; 1 if true)
+; by doing:
+; set tblptr (tblptru/tblptrh/tblptrl)
+; tblrd *
+; result in tablat
+
+; i2c_master_setup if so, i2c_slave_setup if not
+
+
+
+
+
 ;----------------------------------------------------------------------------
 
 ; interrupt set-up