View Single Post
Old 04-15-2014, 07:52 PM   #24 (permalink)
P-hack
Master EcoModder
 
P-hack's Avatar
 
Join Date: Oct 2012
Location: USA
Posts: 1,408

awesomer - '04 Toyota prius
Thanks: 102
Thanked 252 Times in 204 Posts
No way of knowing Anyway I've been pretty limited by the 8 bit stuff for to long so I am using this as an excuse to explore the options.


Thinking out loud...
internal voltage reference is 1.224V. Assuming pack voltage.
each analog pin tied to ground through a 10k resistor, and connected to the cell tap with a custom resistor. Going around the board clockwise, the pins appear in this order, so suggest mapping the ADCs that way too.
Then hookup is more logical.
Code:
cell	pin#	adc#
1	PB15	ADC_IN21
2	PB14	20
3	PB13	19
4	PB12	18
5	PB1	9
6	PB0	8
7	PC5	15
8	PC4	14
9	PA7	7
10	PA6	6
11	PA5	5
12	PA4	4
13	PA3	3
14	PA2	2
15	PA1	1
16	PA0	0
17	PC3	10
18	PC2	12
I took the liberty of mapping out the ADC on the discovery:
Attached Thumbnails
Click image for larger version

Name:	discover.jpg
Views:	252
Size:	93.2 KB
ID:	14881  
  Reply With Quote