| Author |
Message |
|
|
Posted: Jun 17, 2012 - 06:20 PM |
|


Joined: Oct 30, 2002
Posts: 5713
Location: The Netherlands
|
|
There is nothing stopping you from having only one data byte per line instead of standard 16.
That might simplify coding.
Likely the programmer also accepts a raw binary file, maybe that's even simpler. |
|
|
| |
|
|
|
|
|
Posted: Jun 17, 2012 - 11:07 PM |
|

Joined: Jun 13, 2012
Posts: 38
|
|
|
ka7ehk wrote:
The hex file format has an address, several other bytes, and the data for (typically) 8 bytes. The data is for the 8 memory addresses starting at the given address. The programmer converts this data into the signals needed to program the EEPROM.
So, the hex file has many lines, each line is for a block of 8 addresses, You could construct the file by hand though it would be tedious.
Jim
I looked that over and over again and I still can't figure this out. Here's the hex format I'm looking at http://en.wikipedia.org/wiki/Intel_HEX#Example
If the data as you're mentioning is the data corresponding to the voltage and current vectors, where's the place for the output of the table. The eeprom needs to be programmed for the output of the memory lookup table as well. |
|
|
| |
|
|
|
|
|
Posted: Jun 18, 2012 - 12:51 AM |
|


Joined: Oct 30, 2002
Posts: 5713
Location: The Netherlands
|
|
| The address is the combined voltage/current vector, the data is the output state. |
|
|
| |
|
|
|
|
|
Posted: Jun 18, 2012 - 02:49 AM |
|

Joined: Jun 13, 2012
Posts: 38
|
|
|
jayjay1974 wrote:
The address is the combined voltage/current vector, the data is the output state.
But then, my look-up table will be meaningless 'cause i need to store a set of voltages and currents at each address and spit out the switch state as the output of the table. Is it not possible with eeprom. |
|
|
| |
|
|
|
|
|
Posted: Jun 18, 2012 - 06:19 AM |
|

Joined: May 02, 2007
Posts: 3007
Location: Nieuwegein, Netherlands
|
|
no it is the other way around.....
each address is a voltage and a current and at that address is the switch state that will be out putted when you select that address. |
_________________ 1)Datasheet and application notes checked?
2)tutorial forum
3)Newbie start here
|
| |
|
|
|
|
|
Posted: Jun 18, 2012 - 06:39 AM |
|

Joined: Jun 13, 2012
Posts: 38
|
|
|
meslomp wrote:
no it is the other way around.....
each address is a voltage and a current and at that address is the switch state that will be out putted when you select that address.
Thank you for some light here. But I am wondering how do i corelate each address with the switch state. I have a set of voltages from 0-30 V and a set of currents from 0-5 amp in a theoretical look-up table wherein, corresponding to each point of voltage and current, there is a theoretically derived switch state. How does the address knows what voltage and current it represents.
thanks! |
|
|
| |
|
|
|
|
|
Posted: Jun 18, 2012 - 07:19 AM |
|


Joined: Dec 06, 2007
Posts: 2512
Location: Redmond, WA USA
|
|
Think of an array of switch states:
Switch_State_Array[1000] = {1, 0 , 0 , 1, 1, 1, 0, ...}
Then store the switch state that correlates to a voltage and current at the offset of [voltage+current] in the Switch_State_Array.
So that:
Switch_State = Switch_State_Array[voltage+current];
Then imagine EEPROM is the array:
Switch_State = EEPROM[voltage+current];
Does that help? |
_________________ Larry
Those afraid to embrace the future will quickly fade into the past. - larryvc
Last edited by larryvc on Jun 19, 2012 - 06:40 AM; edited 1 time in total
|
| |
|
|
|
|
|
Posted: Jun 18, 2012 - 07:54 AM |
|

Joined: Jun 13, 2012
Posts: 38
|
|
Lary, Thank you for your response. I'm still not able to figure out how to store a value for a voltage and current at the address. Here's a small example of what i have in my theoretical stuff that i'm trying to implement. eg. i have a 2-d look up table with voltage on the column vector and current on the row vector. I have switch states corresponding to each voltage and current value on the memory lookup. How do i store this kind of setup on the eeprom. I understand that each address line can be programmed to have specific outputs. just see the table below, how do i store the values of the voltages and currents at each address. the switch states are the output of the table that'll go back to the converter. the real time voltages and currents will come from the converter, hit the lookup table and spit out the switch state as output back to the converter's FET or IGBT to providing switching. this is the control scheme.
V(C)| I(L)
0 | 0.5 1 1.5 2
|
0.5 | 1 0 0 1
|
1 | 1 0 0 1
|
1.5 | 1 0 1 1
|
2 | 1 0 1 0 1 |
|
|
| |
|
|
|
|
|
Posted: Jun 18, 2012 - 08:50 AM |
|


Joined: Oct 30, 2002
Posts: 5713
Location: The Netherlands
|
|
| You DON'T program the current voltage information in the EEPROM. You must devise a mapping from current&voltage information to an address. |
|
|
| |
|
|
|
|
|
Posted: Jun 18, 2012 - 09:00 AM |
|


Joined: Dec 06, 2007
Posts: 2512
Location: Redmond, WA USA
|
|
|
jayjay1974 wrote:
You DON'T program the current voltage information in the EEPROM. You must devise a mapping from current&voltage information to an address.
And at that mapped address you store/retreive the switch state. |
_________________ Larry
Those afraid to embrace the future will quickly fade into the past. - larryvc
|
| |
|
|
|
|
|
Posted: Jun 18, 2012 - 11:45 AM |
|

Joined: Jun 13, 2012
Posts: 38
|
|
|
larryvc wrote:
jayjay1974 wrote:
You DON'T program the current voltage information in the EEPROM. You must devise a mapping from current&voltage information to an address.
And at that mapped address you store/retreive the switch state.
I see what you both are saying, can you give a small example which can give me a way to implement what you're suggesting.
thanks !!!! |
|
|
| |
|
|
|
|
|
Posted: Jun 18, 2012 - 01:18 PM |
|


Joined: Oct 30, 2002
Posts: 5713
Location: The Netherlands
|
|
I'm assuming 2 bits for both the ADCs. So 2x2=4 bits=2^4=16 different addresses. You connect the output of the current ADC to A0 and A1, of the voltage ADC to A2 and A3.
address=current+voltage*4
Table:
Code:
address - current - voltage
0 0 0
1 1 0
2 2 0
3 3 0
4 0 1
5 1 1
6 2 1
7 3 1
8 0 2
9 1 2
10 2 2
11 3 2
12 0 3
13 1 3
14 2 3
15 3 3
|
|
|
| |
|
|
|
|
|
Posted: Jun 18, 2012 - 02:30 PM |
|

Joined: Jun 13, 2012
Posts: 38
|
|
|
jayjay1974 wrote:
I'm assuming 2 bits for both the ADCs. So 2x2=4 bits=2^4=16 different addresses. You connect the output of the current ADC to A0 and A1, of the voltage ADC to A2 and A3.
address=current+voltage*4
Table:
Code:
address - current - voltage
0 0 0
1 1 0
2 2 0
3 3 0
4 0 1
5 1 1
6 2 1
7 3 1
8 0 2
9 1 2
10 2 2
11 3 2
12 0 3
13 1 3
14 2 3
15 3 3
Wow.. That's a very simple explanation. But, I was wondering whether it's possible or not to setup the same thing as in simulation in the memory chip. i.e. Without having knowledge of what's coming from the adc's is it impossible to store the voltage and current vectors inside the memory chip corresponding to the addresses.
Like, in my simulink model, I could easily create a 2-d and 3-d look-up table, i could store a voltage and current vector and I could also populate the table data with switch states for each point.
thanks.. |
|
|
| |
|
|
|
|
|
Posted: Jun 18, 2012 - 02:57 PM |
|


Joined: Oct 30, 2002
Posts: 5713
Location: The Netherlands
|
|
Therefore you should determine what comes from the ADC; e.g. what is its exact transfer function? An ADC does not generate output in nice engineering units.
I guess your table is now set up with engineering units with a few specific limit points. An EEPROM can't do this, you need to program it with all possible combinations of ADC values. The easiest way is to write a Matlab function that creates an output state for a given voltage and current, then with another function generate all possible combinations. After all, an ADC has a limited, finite number of states (generally between 8 to 16 bits, or 256 to 65536 states). Every extra bit doubles the table size though.
Though I think what you want is impossible. You would need something more elaborate than the EEPROM if you want the table to be sparse. Like a microcontroller
If you have this EEPROM chip programmed, where does it plug into? |
|
|
| |
|
|
|
|
|
Posted: Jun 18, 2012 - 03:04 PM |
|

Joined: Jun 13, 2012
Posts: 38
|
|
|
jayjay1974 wrote:
Therefore you should determine what comes from the ADC; e.g. what is its exact transfer function? An ADC does not generate output in nice engineering units.
I guess your table is now set up with engineering units with a few specific limit points. An EEPROM can't do this, you need to program it with all possible combinations of ADC values. The easiest way is to write a Matlab function that creates an output state for a given voltage and current, then with another function generate all possible combinations. After all, an ADC has a limited, finite number of states (generally between 8 to 16 bits, or 256 to 65536 states). Every extra bit doubles the table size though.
Though I think what you want is impossible. You would need something more elaborate than the EEPROM if you want the table to be sparse. Like a microcontroller
If you have this EEPROM chip programmed, where does it plug into?
Once I have this eeprom programmed, it will go back to the IGBT of the converter and will provide the switching to the converter based on the switch state. This will be kind of a digital control for converter. The voltage and current from the converter will hit the look up table and will provide the switching to the converter based on the set up of the look up table. |
|
|
| |
|
|
|
|
|
Posted: Jun 18, 2012 - 03:14 PM |
|


Joined: Oct 30, 2002
Posts: 5713
Location: The Netherlands
|
|
But is there an ACTUAL tangible circuit you can touch and feel and admire? Or at least its design and not some preconceptualization sketch in Simulink?
edit: I have the feeling you are trying to do something that's typically done when fleshing out the (minute) details of a design, while you're at the stage where you perform preliminary theoretical, rather abstract simulations where actual design parameters are yet unknown. |
|
|
| |
|
|
|
|
|
Posted: Jun 18, 2012 - 03:22 PM |
|

Joined: Jun 13, 2012
Posts: 38
|
|
|
jayjay1974 wrote:
But is there an ACTUAL tangible circuit you can touch and feel and admire? Or at least its design and not some preconceptualization sketch in Simulink?
We have converter boards designed and working in our lab which we have already used for analog control and digital control through microcontrollers. Now we are trying to make them work with digital control without using serial protocol. I have worked only on analog control before and sometimes using DSPACE, but never used digital control like this.
I see what you're saying that it may look impossible right now but that's something we still have to atleast go for it.
So, if I'm using ADC's with 2 bit, for a 3-d look-up table, I'll need 3^(2*2*2) memory addresses for the memory chip right? Is that what you were suggesting earlier?
thanks ?? |
|
|
| |
|
|
|
|
|
Posted: Jun 18, 2012 - 05:51 PM |
|


Joined: Oct 30, 2002
Posts: 5713
Location: The Netherlands
|
|
| 2^(total_number_of_adc_bits + additional_state_input_bits) |
|
|
| |
|
|
|
|
|
Posted: Jun 18, 2012 - 06:25 PM |
|

Joined: Jun 13, 2012
Posts: 38
|
|
| If I'm using 3 ADCs of 4 bits each, the total number of adc bits would be 12, right? so, total addresses would be 2^(12), right? |
|
|
| |
|
|
|
|
|
Posted: Jun 18, 2012 - 06:34 PM |
|


Joined: Oct 30, 2002
Posts: 5713
Location: The Netherlands
|
|
|
|
|
|
|