Kart/battery level

From FSI
(Difference between revisions)
Jump to: navigation, search
(Created page with "{{private}} {{TOC right}} == PIC 18F2525 MCU as ADC Converter == The task of the PIC MCU inside the system is to reset the FPGA and to start ADC conversions and transfer these...")
 
 
(2 intermediate revisions by one user not shown)
Line 1: Line 1:
{{private}}
 
 
{{TOC right}}
 
{{TOC right}}
== PIC 18F2525 MCU as ADC Converter ==
+
== ADC ==
The task of the PIC MCU inside the system is to reset the FPGA and to start ADC conversions and transfer these data to the FPGA.
+
The interface PIC/FPGA is as follows:
+
  
* PIC RA5 (Pin 5) -> FPGA Reset -> FPGA (Pin 20)
+
The ADC on the power supply board is a 16-bit 15SPS I2C [[media:MCP3425.pdf|MCP3425]].
* PIC RA1 (Pin 3) -> Data Valid Bit -> FPGA (Pin 26)
+
* PIC RC0 (Pin 11) -> Data 0 -> FPGA (Pin 8)
+
* PIC RC1 (Pin 12) -> Data 1 -> FPGA (Pin 6)
+
* PIC RC2 (Pin 13) -> Data 2 -> FPGA (Pin 4)
+
* PIC RC3 (Pin 14) -> Data 3 -> FPGA (Pin 2)
+
* PIC RC4 (Pin 15) -> Data 4 -> FPGA (Pin 3)
+
* PIC RC5 (Pin 16) -> Data 5 -> FPGA (Pin 5)
+
* PIC RC6 (Pin 17) -> Data 6 -> FPGA (Pin 7)
+
* PIC RC7 (Pin 18) -> Data 7 -> FPGA (Pin 10)
+
* PIC RB1 (Pin 22) -> Data 8 -> FPGA (Pin 15)
+
* PIC RB2 (Pin 23) -> Data 9 -> FPGA (Pin 19)
+
* PIC RB3 (Pin 24) -> Data 10 -> FPGA (Pin 21)
+
* PIC RB4 (Pin 25) -> Data 11 -> FPGA (Pin 23)
+
  
As long as the '''Data Valid Bit''' is 1, the data of the data bits are valid and can be read, before the data bits gets updated, the '''Data Valid Bit''' goes to 0 and as soon as all bits have changed their state, the '''Data Valid Bit''' returns to 1.
+
It is read by sending ''start'', D1, FF, FF, ''stop''.
 +
The I2C master has to acknowledge all data bytes (FF) except for the last one.
 +
 
 +
The control register is written by sending ''start'', D0, 14, ''stop''.
 +
Value 14 means:
 +
* continuous conversion
 +
* 16 bit resolution (15 SPS)
 +
* unity gain (1V/V)
  
 
[[Category:Kart]]
 
[[Category:Kart]]

Latest revision as of 10:06, 25 July 2014

Contents

ADC

The ADC on the power supply board is a 16-bit 15SPS I2C MCP3425.

It is read by sending start, D1, FF, FF, stop. The I2C master has to acknowledge all data bytes (FF) except for the last one.

The control register is written by sending start, D0, 14, stop. Value 14 means:

  • continuous conversion
  • 16 bit resolution (15 SPS)
  • unity gain (1V/V)
Personal tools
Namespaces
Variants
Actions
Navigation
Modules / Projects
Browse
Toolbox