Home
Programming the MC143120 NEURON CHIP AN1251 - Rcl
Contents
1. 128 217 255 129 217 254 0x02 0xF1 0x86 oy Ox0A 0xF1 0x88 Ox0A 0xF1 0x92 Ox0A 0xF1 0x9C 0x02 0xF1 0xA6 Ox0A 0xF1 0xA8 Ox0A 0xF1 0xB2 Ox0A 0xF1 0xBC 0x02 0xF1 0xC6 Ox0A 0xF1 0xC8 Ox0A 0xF1 0xD2 Ox0A 0xF1 0xDC 0x02 0xF1 0xE6 49 o os SON sos O O O O 0 JE lt AN1251 AL 410 201 49 117 241 161 128 153 253 128 1 239 253 241 135 1 NON oo gt OOO O O O Oo Oo vw lt lt 8 240 84 180 14 0 0 0 0 OQ 0 0 0 Oj Oye 0 0 0 0 0 0 0 16 1 116 1 116 1 24 1 24 1 24 11 24 1 24 116 1 325 1 69 83 84 95 36 155 34 35 0 4 0 4 By by By Oy 0 0 0 0 O ELS 0 0 0 0 63 0 213 597 2 2 113 83 113 111 118 5 117 241 3 118 8 3 117 241 107 23 117 241 24 136 128 129 28 132 24 116 24 116 128 130 17 241 87 132 28 130 24 116 8 24 136 128 16 128 132 24 36 128 129 24 116 113 102 180 116 128 130 24 84 180 64 24 6 128 132 24 36 128 129 24 132 24 116 113 28 1 28 116 1 30 24 116 24 136 128 28 132 24 116 128 130 24 255 114 21 153 153 254 10 195 113 18 153 254 254 10 195 70 128 153 253 128 3 201 0 4 0 0 200 217 253 49 MOTOROLA LonWorks TECHNOLOGY Ox0A 0xF1 0xE8 0 0 0 0 0 0 0 0 Ox0A 0xF1 0xF2 0 0 0 0 0 0 0 0 0x04 0xF1 0xFC 0 0 0 0 0x00 Ox0A 0xF0 0x2
2. This program uses 10 The data book shows 38 bytes as a maximum for the 10 MHz clock rate see data book B 1 5 when the configuration and application checksums are used his size may be increased if the receiving node buffers sizes are known Depending on receiving node clock rate and amount of RAM dedicated to buffers increasing the number of data bytes placed in a packet can drastically increase the time to program a Neuron Chip 3 The only time ack service is used is loading the application All other cases unack service is used For a possible noisy environment this may want to be changed to unack This program would really speed up if unack is used Currently there is a timer load_image that is used to know when to set up the next packet This program could be changed so that the ack is waited for Other possible additions a Check if the node to be programmed has its read write bit set b Maximum number of times to resend a messag MOTOROLA LonWorks TECHNOLOGY AN1251 AL 413 y If the version number on the node to be programmed is the same as what is expected For example do not program a version 2 3120 with a version 3 exported file d Program configuration data If configuration data is programmed program it first In addition make sure your NEI file is program with the new configuration information The reason the configuration is programmed first is because the NEI file co
3. an MC143120 will not be downloadable to an MC143150 and vice versa The contents of the NEI file for the MC143120 will depend on how the program was exported i e applicationless un configured or configured Applicationless and unconfigured versions will contain no address information Unconfigured and configured versions will contain an application MAXIMUM DATA BYTES As shown in Appendix B of DL159 D LonWorks Technol ogy Device Data no more than 38 data bytes for a worst case of 10 MHz input clock rate should be written at one time The 38 byte limit gives the NEURON CHIP enough time to prevent a watchdog time out from programming too many EEPROM bytes and re calculating the application and con figuration checksums The 38 byte limitation may be in creased by calculating the checksums in a separate network management operation 38 bytes is too large for the default input network buffer size of 42 bytes 16 bytes can be safely written on a new MC143120 This size may be increased depending on the receiving node s clock rate to prevent watchdog time out if both checksums are re calculated and on the size of the receiving node s buffers Acknowledged service is used for downloading application data and unacknowledged service for everything else prog3120 nc is written so that the service type does not add to the amount of time required for the node to send the commands prog3120 nc uses a timer called 1oad image to k
4. code data and the 2 byte address at which the code data is to reside If using the NEI file format a 1 byte data at the r w bit address Oxf00a should be moved to the end of the S records before the last reset S9 record S2 S8 Not applicable to LONBUILDER v2 2 software sg A termination record for a block of S1 records When encountered using the NEI file format the node should be reset Typically there is only one termination record S9 but the NEI file may use multiples of these showing where a reset of the receiving node should be done MOTOROLA LonWorks TECHNOLOGY APPENDIX B TRANSPOSING AN NEI FILE TO prog3120 nc FORMAT A test program called test_io nc was used to export to an NEI file The node was configured for 10 MHz 1 25 MBPS differential input configured Following is the test_io nei file created LOSFOO80803F7 113F02C05AC03010000000000000000000000001B 105F0240000E6 109F026000000000000E0 104F03C557A L12FO3D000000000000018400FFFFFFFFFFFF41 10EF08C000000000000000000000075 106F0973FFF0F25 10BF00D544553545F494F00C0 108F008F1DBO1F1EE53 112F01513F012249B222323000000FF38000471 123F1 L2 3FT L23F1 123F1 123F1 9030000FC 113F02C25AC010401000100003D000000000000BB 9030000FC 104F01514E2 104F00A0100 9030000FC S S S S S S S S S S S S S S S S S S S S S S S S S S S S S S The contents
5. number NEURON 3120 used in a TURPRO 832 base This programmer also must be connected to a PC lt pro grams up to eight MC143120s System General s pro grammer carries the same limitations as Echelon s the MC143120 must be set up with the following parameters 10 MHz 1 25 Mbps and differential In addition the MC143120 must be applicationless prior to use of the gang programmer Once programmed the MC143120 cannot be reprogrammed by the System General programmer unless returned to an applicationless state On an MC143120 with firmware version 3 clearing address 0xf029 will reset it back to the factory defaults which are 10 MHz 1 25 Mbps differ ential input and applicationless The System General uses the NXE format whereas Eche lon s 3120 programmer uses the NEI format The NXE for mat is the downloadable application with no connection information NXE is set up only for unconfigured nodes The NEI format differs from the NXE in that it can be set up as applicationless unconfigured or configured The NEI format is an internal file format used by Echelon it is also used by the prog3120 nc application in this program For details refer to the LONBUILDER User s Guide Chapter 7 Echelon s API With the use of a PC a tool such as Echelon s Lon MANAGER which is written using Echelon s Application Pro grammer s Interface can be used to program MC143120s It is also possible to write one s own programme
6. of the S records may be analyzed by looking at the memory map structures in Appendix A in DL159 LonWorks Technology Device Data The next step is to run alon exe For simplicity place the file to be converted test io nei in the same directory as alon exe This step is optional lf you know which directory the NEI file is located in you can move to that direc tory through the menus Type Description alon At the DOS prompt run this program A menu comes with the heading Choose NXE File to load nel Under Name change to nei Move the cursor to highlight your NEI file In this example it is test_io nei lt enter gt A menu comes up asking Enter Output File Name MOTOROLA LonWorks TECHNOLOGY 123F04C0000000000000000000000000000000000000000000000000000000000000000A0 123F06C000000000000000000000000000000000000000000000000000000000000000080 123F09B99FE760002713B760102714876020271557603027162760402716F760502717C10 123F0BB76060375F14976070375F15B76080375F16D76090375F17E760A0375F18FE47537 L23FODBF19F81188880811874808218748084187475F19F821888808118748082187480F3 L23FOFB84187475F19F84188880811874808218748084187475F19FB4081888808118741F 1B8082187480841874717AB41018888081187480821874808418747168B42018886B 3B8081187480821874808418747156B440188880811874808218748084187471444A 123F15BB48018888081187480821874808418747132801888818118748082187480841816 7 9 B B747121801888808118748182187480841874711080188880811874808218748
7. the record excluding the type and record length Address 4 6 8 The 2 3 or 4 byte address at which the data field is to be loaded into memory LONBUILDER V 2 2 software uses only a 2 byte address This is due to the NEURON CHIP s 16 bit addressing From 0 to n bytes of executable code memory loadable data or descriptive information To ensure a node can talk to another node keep the data size limited to 11 bytes This number may be increased only if the Code Data 0 2n AN1251 AL 408 network node s characteristics such as number of buffers size and traffic are understood Checksum 2 The least significant byte of the one s complement of the sum of the values represented by the pairs of characters making up the record length address and the code data fields The record length byte count and checksum fields en sure accuracy of transmission S RECORD TYPES There are eight types of S records to accommodate the various needs of the encoding transportation and decoding functions LONBUILDER v2 2 software uses only S1 and S9 re cord types An S record format module may contain S records of the following types Type Description So The header record for each block of S records The code data field may contain any descriptive information identifying the following block of S records The address field is normally zeros LONBUILDER v2 2 software does not use this S record S1 A record containing
8. 161 B8418742099FF721599FE3ED9FEB40B99FE0AC34781D9FFB409D9FE711299FE3FA5 BD9FEB40B99FE0AC34680D9FF81D9FE8099FD8003C93175F1E98099FD8003C931CB 1EF1DBO1EFFDF1CF00040000000108F09AB419D9FD3100080100000E0000E6 test_io alo Type in an output file name that will be created A file is created and the program is terminated The file created has a format similar to the one below test_ io alo Starting with the second line in this example it is 2 221 paste this and the rest of the table into prog3120 nc under the data table called codedata Also place the number after the size in this example it is 733 in the index of codedata The second line represents the byte size of the array with the following format size of array 1st number x 256 2nd number For example 2 221 gt array size 2 x 256 221 733 bytes AN1251 AL 409 size 733 DDN 0x02 0xF0 0x08 8 Ox0A 0xF0 0x08 241 O0x0A 0xF0 0x12 73 Ox0A 0xF0 0x1C 35 0x02 0xF0 0x26 0 0x0A 0xF0 0x28 0 0x0A 0xF0 0x32 0 Ox0A 0xF0 0x3C 85 0x02 0xF0 0x46 255 3 147 19 0 0 0 0 0 299 1 0 0 241 166 19 16 0 255 84 18 56 0 0 0 172 0 0 oo UI Ox0A 0xF0 0x48 255 255 255 255 0 0 0x0A 0xF0 0x52 255 Ox0A 0xF0 0x5C 118 0x02 0xF0 0x66 118 Ox0A 0xF0 0x68 2 Ox0A 0xF0 0x72 2 Ox0A 0xF0 0x7C Ty 0x02 0xF0 0x86 0x0A 0xF0 0x88 9 Ox0A 0xF0 0x92 72 Ox0A 0xF0 0x
9. 49 A428 LD LoS 128 3 Ox0A 0xF1 OxCF 201 49 117 241 233 128 153 253 128 3 0x02 0xF1 0xD9 201 49 Ox0A 0xF1 OxDB Ty 239 253 241 207 0 4 0 0 0 Ox0A 0xF1 OxE5 al 8 240 154 180 EAS IS DD 49 0 0x07 OxF1 OxEF 8 Ls 0 0 14 0 0 0x00 Ox0A OxFO 0x2C IV MT dy 4 1 0 ile 0 0 61 0x06 OxF0 0x36 0 0 0 0 0 0 0x00 0x01 OxFO 0x15 20 0x01 OxFO Ox0A Lz 0x00 y BRK KK KR OR OK Globals NA hop o lt NM service pin msg svc pin msg copy of service pin messag const char image ptr points to 1 byte in codedata This is next byte to write const char last image ptr enum set_offline unack set_appless unack load_info if size field 0 reset node unack else ack typically it will be this reset_node unack recalculate_cs ack set_config unack set_online unack final_reset unack image_state set_offline AN1251 MOTOROLA LonWorks TECHNOLOGY AL 416 BORK RK KK AA Timers FRR RR k k RR RR RR OR OR OR OK RK KK mtimer load_image when to send ready next packet BRK KK KR RR RR OR RR OR OK OK Functions FOR RR RR RR RR RR RR OR KR OK OK KK void config_message service_type type int code msg_out priority_on FALSE msg_out authenticated FALSE msg_out dest_addr nrnid type NEURON_ID msg_out dest_addr nrnid domain 0 msg_out dest_addr nrn
10. 5 MHz 78 KBPS config message UNACKD NM write memory NM opcode base when io changes IO left sw to PRESSED io out IO red led OFF LO0ut 1O sound 0 he display byte index display byte index 2 if display byte index gt NEURON ID LEN 6 bytes AN1251 MOTOROLA LonWorks TECHNOLOGY AL 422 display_byte_index 0 io out IO_red_led ON MOTOROLA LonWorks TECHNOLOGY AN1251 AL 423
11. 5 bytes Remaining ROM 16099 bytes EEPROM Usage not necessarily in order of physical layout System Data Parameters 74 bytes Domain amp Address Tables 105 bytes Network Variable Config Tables 0 bytes Application EEPROM Variables 0 bytes Library EEPROM Variables 0 bytes Application Code amp Const Data 0 bytes Library Code amp Const Data 0 bytes Total EEPROM Requirement 179 bytes Remaining EEPROM 333 bytes RAM Usage not necessarily in order of physical layout System Data amp Parameters 572 bytes Transaction Control Blocks 140 bytes AN1251 AL 420 MOTOROLA LonWorks TECHNOLOGY Appl Timers amp I O Change Events 7 bytes Network amp Application Buffers 792 bytes Application RAM Variables 19 bytes Library RAM Variables 0 bytes Total RAM Requirement 1530 bytes Remaining RAM 518 bytes Required header files include lt addrdefs h gt include lt access h gt include lt netmgmt h gt include lt msg_addr h gt Timing Testing Notes 1 This program only shows that it is possible to change the communication parameters Refer to Appendix B in the data book under Configuration Changes for the proper sequence to take A BORK KR KR KR RR RR RR k OR KK Compiler directives FER RA A RRA A KA KA KA RRA RAR RARA I pragma enable_io_pullups pragma scheduler_reset define PRESSED 0 Switch pressed define ON 0 Led is on if given a 0 define OFF 1 Led is off i
12. 9C 0x02 0xF0 0xA6 117 Ox0A 0xF0 0xA8 Ox0A 0xF0 0xB2 Ox0A 0xF0 O0xBC 0x02 0xF0 0xC6 1 Ox0A 0xF0 0xC8 Ox0A 0xF0 0xD2 1 Ox0A 0xF0 0xDC 1 0x02 0xF0 0xE6 1 Ox0A 0xF0 0xE8 1 Ox0A 0xF0 0xF2 Ox0A 0xF0 0xFC 1 0x02 0xF1 0x06 1 Ox0A 0xF1 0x08 1 Ox0A 0xF1 0x12 1 Ox0A 0xF1 0x1C 1 0x02 0xF1 0x26 Ox0A 0xF1 0x28 Ox0A 0xF1 0x32 1 Ox0A 0xF1 0x3C 1 0x02 0xF1 0x46 1 Ox0A 0xF1 0x48 128 Ox0A 0xF1 0x52 116 Ox0A 0xF1 0x5C 254 0x02 0xF1 0x66 71 Ox0A 0xF1 0x68 217 Ox0A 0xF1 0x72 29 30 325 29 29 16 39 L 24 11 87 1 24 11 24 1 28 1 24 11 16 11 16 1 16 1 36 1 16 1 16 1 48 1 24 1 28 1 LS 1 3 113 8 228 241 30 327 28 28 13 28 32 24 1 47 24 129 62 129 255 6 6 1 36 1 6 1 24 1 3 1 24 1 24 1 28 1 24 1 28 1 36 1 0 2 98 3 117 241 117 28 24 28 17 16 20 36 32 30 16 136 132 Zi 180 63 217 254 180 28 1 16 1 16 1 66 1 29 1 24 1 153 254 118 113 72 118 118 4y 2 113 124 118 6 3 3 117 241 21 118 56 1 87 1 24 1 18 241 29 130 136 128 132 24 29 24 129 241 128 1 180 87 180 30 16 28 1 1281 24 1 32 24 29 24 16 113 28 1 80 1 24 1 30 28 16 128 64 16 1 129 1 13 30 24 128 129 24 24 116 153 254 180 11 9 217 254 dl A537 Ox0A 0xF1 0x7C
13. AL 418 image_ptr image_ptr count lt size low byte of address to next byte in table high byte of address to next byte in table point point do not recalculate checksum count point to next byte in table 5 count ximage_ptr NM_opcode_base reset node NM_set_node_mode NM_opcode_base both checksums NM_checksum_recalc NM_opcode_base if msg_alloc fails will try in again in 1 ms image_ptr last_image_ptr indicate finished with write MOTOROLA LonWorks TECHNOLOGY image_state next command in sequence load_image 100 when to send next packet These commands typically do not take as long as a write message Although according to the data book a reset can take up to 18 seconds worst case See appendix B under application downloading break case load_info if long unsigned image_ptr gt const long unsigned amp codedata long unsigned amp codedata image_state reset_node load_image 150 give more time for up to 10 byte xfers break case final reset installation complete io out lamp 50000 indicate finished with process break when msg_arrives when resp_arrives when msg_completes MOTOROLA LonWorks TECHNOLOGY AN1251 AL 419 APPENDIX D kk kk kk kk k k kk kk kk kk kk kk kk AA Filename comml nc Motorola Inc Disclaim
14. C 0x06 0xF0 0x36 4 0 0 0 0 0 0x00 0x01 0xF0 0x15 0x01 0xF0 0x0A 1 0x00 alon exe takes the NEI file which is in Motorola s S record format Appendix A of this databook explains the S record format and converts it into a new file with the following rules 1 The format is lt of data bytes gt ex 0x02 lt 2 byte address gt lt data gt OxF0 0x08 8 3 where lt of data bytes gt is between 0 and 0x0A in hex lt 2 byte address gt is in hex lt data gt is between 0 10 bytes of data in decimal to be downloaded MOTOROLA LonWorks TECHNOLOGY 0 0 0 0 0 103 2 Replaces s9 record with 0x00 record meaning to reset the MC143120 3 If found move a single byte data record at address 00a to the bottom before the node is reset a 0x00 record as in Step 1 4 No more than 10 data bytes per record If a number higher than 10 is encountered a new record s is created REFERENCES 1 Packaging Manual for ASIC Arrays by Joellen Cas cante Motorola Issue A 1990 2 NEURON CHIP Test Board User s Manual M143205EVK AN1251 AL 411 APPENDIX C KK kk kk k kk kk kk kk kk kk kk kk kk kk kk k k AA Filename prog3120 nc Motorola Inc Disclaimer Motorola reserves the right to make changes to this software without further notice herein Motorola makes no warranty representation or guarantee regarding the suitability of this software for any particular purpose nor does
15. FALSE msg out dest addr nrnid type NEURON ID msg out dest addr nrnid domain 0 msg out dest addr nrnid subnet 0 msg out service type memcpy msg out dest addr nrnid nid svc pin msg neuron id 6 msg out dest addr nrnid retry 15 msg out dest addr nrnid tx timer 10 msg out code code msg send BORK KK KR RR RR OR OR OK OR KK Reset FRR RR RR RR RR RK KK when reset io out IO display amp dd_config 8 dd data 0 0x80 dd data 1 0x00 dd data 2 0x00 lo out IO display dd data 24 KOR KR RR RR AAA AAA OR OR OK OK OK Priority When Clauses KOR RR RR RR RK KR KK OK KK KK none RRR RK KR KK AA AA OK OR kk OK Non Priority When Clauses A when msg arrives NM opcode base NM service pin code 0x7f io_out IO_red_led ON io out IO sound 30 memcpy 4svc pin msg msg in data sizeof NM service pin msg dd data 0 0x80 update display with service pin id display byte index 0 dd data 1 svc pin msg neuron id 0 most significant nibble dd data 2 svc pin msg neuron id 1 next nibble io out IO display dd data 24 output to display program neuron chip with 78 KBPS 5 MHz msg out data 0 2 config relative msg out data 1 0 comm clock input clock msg out data 2 8 1 2 is a long msg out data 3 1 of bytes to write msg out data 4 4 cnfg cs recalc msg out data 5 Oxlc
16. LOGY AN1251 AL 415 Ox0A OxFO OxFB 132 242 ALO LET 2417 s BO 132 24 136 128 Ox0A OxF1 0x05 129 24 L V6 128 130 24 1b6 4287 132 24 Ox0A 0xF1 0x0F 116 17 241 159 180 8 24 136 128 129 0x02 0xF1 0x19 24 Ox0A 0xF1 0x1B 128 130 24 116 128 132 24 116 14139 122 Ox0A OxF1 0x25 180 16 24 136 128 129 24 116 128 130 Ox0A 0xF1 0x2F 24 116 128 132 24 116 113 104 180 32 0x02 0xF1 0x39 24 136 Ox0A 0xF1 0x3B 128 129 24 116 128 130 24 116 128 132 Ox0A OxF1 0x45 24 116 113 86 180 64 24 1367 128 129 Ox0A 0xF1 0x4F 24 116 128 130 24 116 128 132 24 116 0x02 OxF1 0x59 113 68 Ox0A 0xF1 0x5B 180 128 24 136 128 129 24 116 128 130 Ox0A OxF1 0x65 24 116 128 132 Za o AS 50 128 24 Ox0A 0xF1 0x6F 136 129 129 24 116 128 130 24 116 128 0x02 0xF1 0x79 132 24 Ox0A 0xF1 0x7B 116 113 33 128 24 136 128 129 24 116 Ox0A 0xF1 0x85 129 130 24 116 128 132 24 116 113 16 Ox0A 0xF1 0x8F 128 24 136 128 129 24 116 128 130 24 0x02 0xF1 0x99 116 129 Ox0A 0xF1 0x9B 132 24 116 32 158 2554 ILA 2 1937 2547 Ox0A 0xF1 OxA5 627 217 254 180 Tlp 1593 254 10 LIS DL Ox0A 0xF1 OxAF 129 217 255 180 9 211 254 PLES 18 T537 0x02 0xF1 0xB9 254 63 Ox0A 0xF1 OxBB 217 254 180 11 153 2547 107 195 70 128 OXOA OXF Ly OxCbp 21 255 1229 ZET 125
17. MOTOROLA SEMICONDUCTOR TECHNICAL DATA AN1251 Programming the MC143120 NEURON CHIP INTRODUCTION This application note describes how to download an ap plication program to the MC143120 NEURON CHIP over the communications network Typically this is not implemented with the MC143150 because the program is in external EPROM and only address binding and communication information is stored in internal EEPROM This application note describes programming solely for the MC143120 which has no external address or data lines and is always pro grammed over the network The MC143150 is used as the network manager When a service pin message is received a table in the MC143150 application representing the MC143120 s application and configuration data program is downloaded over the network 101 is toggled whenever an acknowledgment is received from the MC143120 If a new data rate needs to be programmed the program must be modified to change the configuration at the start and the node reset This is because the program resets the MC143120 and if changes are made to the configuration data such as the communication data rate communication will be lost Appendix D presents a program called comml nc which will change the communication rate to 78 kbps 5 MHz and optionally display the service pin ID on an Echelon Gizmo 2 or Motorola Gizmo 3 box The changes do not take effect until the node is reset For further informa tion on configuration ch
18. Motorola assume any liability arising out of the application or use of it and specifically disclaims any and all liability including without limitation conseguential or incidental damages 0 1 02 16 93 original 0 2 05 27 94 change codedata using testnei alo 0 2 06 01 94 change time to pulse IO1 Description When receive a service pin message download the table under codedata codedata is only set up to program a 3120 version 3 I O inputs none 1 0 outputs IO 1 pulse when rx a msg_succeeds from node trying to program Then one long pulse when finished net inputs none net outputs none message tags write_image Memory Requirements ROM Usage System Data 2 bytes Application Code amp Const Data 1288 bytes Library Code amp Const Data 0 bytes Self Identification Data 6 bytes Total ROM Requirement 1296 bytes Remaining ROM 15088 bytes EEPROM Usage not necessarily in order of physical layout System Data amp Parameters 74 bytes Domain amp Address Tables 20 bytes Network Variable Config Tables 0 bytes Application EEPROM Variables 0 bytes Library EEPROM Variables 0 bytes Application Code amp Const Data 0 bytes Library Code amp Const Data 0 bytes Total EEPROM Requirement 94 bytes Remaining EEPROM 418 bytes RAM Usage not necessarily in order of physical layout System Data amp Parameters 572 bytes Transaction Control Block
19. O 0x36 0 0 0 0 0 0 0x02 OxFO 0x24 0 0 0x06 OxFO 0x26 0 0 0 0 0 0 0x01 OxFO 0x3C 85 Ox0A OxFO Ox3D 0 0 0 0 0 0 1 132 0 225 0x05 OxFO 0x47 255 255 255 255 255 Ox0A OxFO 0x4C 0 0 0 0 0 0 0 0 0 Ox0A OxFO 0x56 0 0 0 0 0 0 0 0 0 Ox0A OxF0 0x60 0 0 0 0 0 0 0 0 0 0x02 OxFO Ox6A 0 0 Ox0A OxFO Ox6C 0 0 0 0 0 0 0 0 0 Ox0A OxFO 0x76 0 0 0 0 7 0 0 0 Ox0A OxF0 0x80 0 0 0 0 0 0 0 0 0 0x02 OxFO Ox8A 0 0 Ox0A OxFO 0x8C 0 0 0 0 0 0 0 0 0 0x01 OxFO 0x96 0 0x03 OxFO 0x97 63 255 15 0x08 OxFO Ox0D 84 69 83 84 95 73 79 0 0x05 OxF0 0x08 241 219 Vy ZW 2387 Ox0A OxF0 0x15 19 240 18 36 155 34 35 35 0 0x05 OxFO Ox1F Op 259 56 0 4 Ox0A OxFO 0x9B 153 254 118 0 Zp 113 59 118 ly Ox0A OxFO OxA5 113 TQ AUS 2 27 LLS 85 118 3 Ox0A OxFO OxAF 113 98 118 4 25 ES Aly e 5y 0x02 OxF0 0xB9 113 124 Ox0A OxF0 OxBB 118 6 3 117 241 dB LEB Ty 3 LT Ox0A OxFO 0xC5 241 91 118 8 3 117 241 109 118 Ox0A OxF0 OxCF 3 ATV 247 L26 M8 10 3 117 241 14 0x02 OxFO 0xD9 228 117 Ox0A OxFO OxDB 241 159 129 24 136 128 129 24 116 128 Ox0A OxFO OxE5 130 24 116 128 132 24 116 117 241 159 Ox0A OxFO OxEF 130 24 136 128 129 24 116 128 130 24 0x02 OxF0 OxF9 116 128 MOTOROLA LonWorks TECHNO
20. The program prog3120 nc program will always leave the MC 143120 you are attempting to program in the configured on line state even if that is un specified in the NXE file prog3120 nc does not perform a complete verification by reading after every write command A commercial MC143120 programmer should verify the node state after each change be certain that the MC143120 was actually re set upon request and verify EEPROM writes by performing a memory read command after each memory write command AN1251 AL 407 APPENDIX A S RECORD INFORMATION INTRODUCTION The S record format for output modules encodes pro grams and or data files in a printable format for trans portation between computer systems This facilitates S record editing and permits visual monitoring of the trans portation process S RECORD CONTENT S Records are character strings of several fields which identify the record type length memory address code data and checksum Each byte of binary data is encoded as a 2 character hexadecimal number the first character repre sents the high order 4 bits and the second the low order 4 bits of the byte The 5 fields of an S record are TYPE RECORD ADDRESS CODE CHECKSUM LENGTH DATA Field compositions are Printable Field Characters Contents Type 2 S record type SO S1 S9 LONBUILDER V 2 2 software uses only S1 and S9 record types Record 2 The count of the character pairs Length pairs in
21. anges refer to Motorola s DL159 LonWorks Technology Device Data Appendix B BACKGROUND The NEURON CHIP contains a media access processor a network processor and an application processor Most net work management commands received are processed by the network processor and do not make it to the application processor A NEURON CHIP need not have an application in itto be pro grammed All NEURON CHIP programming can be done over the net work The transceiver on the programming node must be compatible with the receiving node s transceiver The MC143120 can be programmed in a socket or after it is sol dered to a printed circuit board The correct approach de pends on the transceiver on the printed circuit board The defaults of a new MC143120 are 10 MHz 1 25 Mbps and differential input It is possible to program a new MOTOROLA LonWorks TECHNOLOGY MC143120 at 78 kbps by lowering the external clock rate from 10 MHz to 625 kHz To program a new MC143120 Echelon s 3120 programmer runs at 5 MHz which scales the network speed 625 kbps Most programmers use the MC143150 to program the MC143120 Lowering the clock from 10 MHz to 5 MHz allows use of a lower cost EPROM A new MC143120 initially set up for 1 25 Mbps may not be programmable if a 78 kbps transformer coupled transceiver will be used however at short distances a transformer tuned to a specific bit rate may still work at different bit rates Alter native techniques include
22. connecting another connector off the board to program the MC143120 or programming the device in a socket prior to soldering it down to the board OPTIONS FOR PROGRAMMING THE MC143120 Currently there are five commercially available methods for programming the MC143120 1 LONBUILDER Developer s Workbench 2 Echelon s 3120 Programmer 3 System General s Gang Programmer 4 Echelon s Application Programmer s Interface API 5 M143205EVK a Motorola Evaluation Kit LoNBuiLDER Developer s Workbench Using this method a Direct Connect board made by Motorola M143204EVK can be used to connect the LONBUILDER s differential direct connect backplane to a cus tom node The use of a custom node requires the use of a differential transceiver At short distances a differential net work connected to the Direct Connect board can communi cate to various differential networks such as an ElA 485 node or a transformer node Distances of up to 50 meters have been tested with this approach however it is not rec ommended to mix a differential network in normal operations unless a router or gateway is used Echelon s 3120 Programmer Model 21700 LONBUILDER NEURON 3120 Programmer The programmer must remain connected to a PC to pro gram the MC143120 Echelon s programmer programs only MC143120s with the following initial parameters 10 MHz 1 25 Mbps and differential input AN1251 AL 405 System General s Gang Programmer Part
23. e the maximum number of data bytes a packet can send to a new MC143120 1 Listed below is the default for the input network buffers on a NEURON CHIP default size max 42 21 size of largest NV For a new MC143120 with no application the default size will be 42 bytes 2 Listed below is the equation to determine an input net work buffer size net_buf_in_size max_msg_size protocol_overhead 6 where max_msg_size gt largest network variable or network management network diagnostic message addressed to the node Explicit messages size includes data code Network variables use size of the network variable 2 protocol_overhead bytes in protocol overhead addresses CRC Worst case is NEURON ID addressing with domain ID of 6 bytes Range is 7 20 bytes Working backwards if the default size 42 bytes with a worst case protocol_overhead addressing of 20 bytes the largest data size is 16 bytes net buf in size max msg size protocol_overhead 6 42 16 20 6 If the addressing size is known and is not the worst case addressing the protocol overhead will be decreased and themax msg size increased If no domain is used the max msg size Will be increased by six bytes prog3120 nc Final Notes prog3120 nc is shown in Appendix C It took approxi mately 15 seconds to download the application to the MC143120 The amount of time required will depend on the number of bytes to program
24. er Motorola reserves the right to make changes to this software without further notice herein makes no warranty the suitability of this software purpose nor does Motorola assume out of the application or use of disclaims any and all liability Motorola representation or guarantee regarding for any particular any liability arising ity and specifically including without limitation consequential or incidental damages 0 1 06 07 94 get svc pin msg Description When program to 78 kbps 5 mhz get svc pin msg program to 78 kbps 5 MHz If using a gizmo 2 or 3 will sound buzzer turn button corresponding next on IO 1 red LED and display ID to IO 7 will scroll to part on service pin messag Pushing and turn off red LED When get to beginning of service pin message red LED goes back on I O inputs IO 7 Io 8 I O outputs Io 0 Io 1 Io 2 net inputs none net outputs none input bit 10_left_sw neurowire master select output frequency clock output bit IO red led Memory Requirements for the 3150 Link Memory Usage Statistics IO 2 7 IO display IO sound 0 OFF output bit IO display select 1 active low ROM Usage System Data 2 bytes Application Code amp Const Data 277 bytes Library Code amp Const Data 0 bytes Self Identification Data 6 bytes Total ROM Requirement 28
25. f given a 1 RRR KR KK OR AA Include files AA include lt addrdefs h gt include lt access h gt include lt netmgmt h gt include lt msg_addr h gt KKK AAA AAA AAA AAA XXX AXA AXA KARA 1 0 Objects RARA RRA KA KA KA KA KA KA KA KA KA KA KA KA k k kk IO 0 output frequency clock 7 IO sound 0 IO 1 output bit IO red led OFF IO 2 output bit IO display select 1 active low IO 7 input bit IO left sw IO 8 neurowire master select IO 2 IO display KKK KK AAA AAA X AXA AXA XX KARA AAA kk Network Variables FERRARA KA KA KA KA KA KA KA KA KA KA k Kk none KKK AAA AA AA A A X AXA AA Message Tags KR RR KA KA KA KA RARA RARA RRA RARA AAA AA none BORK RK OR AA Constants AA none BRK KK KR RO AA Globals FER RA A KA KA KA RRA A KA A KA KA A A K k k k NM service pin msg svc pin msg copy of service pin message unsigned char dd config 0x01 8 bits gt display config reg unsigned char dd data 3 24 bits gt display data reg unsigned int display byte index 0 unsigned int flash static 0 for test board this means on MOTOROLA LonWorks TECHNOLOGY AN1251 AL 421 BORK KR RR RR AA Timers KR RR RR RR RR OR OR RR OR RARAS mtimer flash_LED flash I03 6 if bad on if good KKK RK KR RR RR OR OR OR OR OR OK kk Functions NA void config message service type type int code msg out priority on FALSE msg out authenticated
26. hen it should not be written until after all the other records have been written This is because it contains the read write protect bit which could prevent further downloading if it is set If a record has a data count of zero then the node should be reset at this point AN1251 MOTOROLA LonWorks TECHNOLOGY AL 414 The structure of codedata is as follows first 2 bytes the length of the table lenght of table first byte times 256 second byte The length of the table is what is used to define th size of the array For example if 2 136 are the first two entries in the table the array size is 2 x 256 136 648 gt codedata 648 Each record or each data packet is put on a separate line Each record begins with a data length field If the data length 0 it means to reset the neuron and the record ends Else if the data length is gt 0 it is followed by the address in two bytes and the data bytes themselves The data length and address is in hex the data in decimal Example 1 lt data length 1 entry gt lt address 2 entries gt lt data bytes up to 10 entries gt 15 Z 4 0x02 Ef OxF0O 0x08 8 3 using test_io nei set up for a 3120 10 MHz 78 KBPS differential then used alon exe to make test_io alo 3 const unsigned char codedata 728 2 216 0x02 OxF0 0x08 8 Dy Ox0A OxF0 0x2C 5 172 37 Ly 0 0 0 0 0 0x06 OxF
27. hich option appl ess config message UNACKD NM set node mode NM opcode base break MOTOROLA LonWorks TECHNOLOGY AN1251 AL 417 case set_config 3 4 msg_out data 0 msg_out data 1 config_message UNACKD NM_set_node_mode break case load_info set node state configured online NM_opcode_base last_image_ptr image_ptr if image ptr 0 image_ptr msg out data 0 2 1f size field is zero reset the node point to next byte in table reset node config message UNACKD NM set node mode NM opcode base else msg out data 0 0 msg out data 3 size image ptr image ptr t point to next byte in table r msg_out data 1 image_ptr Dos N msg_out dat image_ptr msg_out data 4 0 0 msg out data for count image ptrt config_message ACKD NM_write_memory break case reset_node case final_reset msg out data 0 2 config_message UNACKD break case recalculate_cs msg out data 0 1 config_message UNACKD break else load_image 1 When msg_fails write_image if image_state load info load image 1 when msg_succeeds write_image io out lamp 1000 switch image_state case set_offline case set_appless case reset_node recalculate_cs fig set_online Case Case set_con case AN1251
28. id subnet 0 msg_out service type memcpy msg out dest addr nrnid nid svc pin msg neuron id 6 msg out dest addr nrnid retry 15 msg out dest addr nrnid tx timer 10 msg out code code msg send BRK KR RR AX XXX OR OR RR OR KK Reset NA when reset not needed E ES PARAR IRAK RR OR RR kk OK KK Priority When Clauses OR RR RR RR RK RR KR KK KKK none KOR KR ROKR KK OR AA OR OR kk OK KK Non Priority When Clauses A when msg_arrives NM_service_pin NM_opcode_base memcpy svc_pin_msg msg_in data sizeof NM service pin msg get local copy of service pin messag image_state set_offline lst step in the sequence image ptr amp codedata 0 point to start in array load image 1 set timer to start sending image 1 ms from now when timer_expires load_image char count char size if msg_alloc returns true if the Neuron chip has buffers for the message This way will never go into pre emption mode msg_out tag write_image switch image_state case set_offline msg out data 0 0 set mode state appl_offline config_message UNACKD NM_set_node_mode NM_opcode_base break case set_online msg out data 0 1 set mode state appl_online config_message UNACKD NM_set_node_mode NM_opcode_base break case set_appless msg_out data 0 3 set mode state change msg out data 1 3 if 0 3 need to tell w
29. now when to send the next command This approach is used because of the time required for the receiving node to program the EEPROM which may take significantly more time than eliciting a response from the receiving node The maximum number of data bytes a packet can send to the MC143120 is limited by the EEPROM write time of the MC143120 as well as by the buffer sizes When sending a write memory command and optional recalculate checksum command to an MC143120 make certain that there is enough time to program all the bytes in the MC143120 be fore the watchdog time out occurs Worst case timing requires 20 ms to write an EEPROM byte 10 ms if it is already erased The translation program alon exe converts the NEI file to an output file with no more than 10 data bytes in a packet 10 data bytes x 10 ms 100 ms The time required to load the next command after a network management memory write command is 150 ms This time differential allows 50 ms tolerance in the event that a message has to be resent thus adding to the transmission and processing times at the transmitting and receiving nodes For all other network management commands the timer is set to 100 ms The only exception to this rule is for the last command a final reset in which no timer is used and after which no more traffic is generated from the network management node MOTOROLA LonWorks TECHNOLOGY MC143120 PACKET SIZE GUIDELINES Use the following guidelines to determin
30. ntains these parameters and when it resets it will lose communication with the node unless the node is already programmed to that data rate 5 NEI file contains both application and configuration data data rate 6 Program configuration data before programming the application so when reset the node the node matches the data rate in the application NI A BRR KR AAA AAA AXA KA KA OR OK OK Compiler directives ANA pragma scheduler_reset pragma enable_io_pullups pragma num_addr_table_entries 1 pragma one_domain pragma app_buf_out_priority_count 0 pragma net_buf_out_priority_count 0 KOR KK KR KR AA Include files AA include lt addrdefs h gt include lt access h gt include lt msg_addr h gt include lt netmgmt h gt include lt control h gt BORK KK KO OR OR RR KK 1 0 Objects KR RR RR KA KA KA KA KA KA KA KA KA K KA k k k IO 1 output oneshot clock 7 lamp everytime rx a msg succeeds response from the node we are trying to program pulse 10_1 KOR KR KK KR AA X AXA AAA Network Variables FER A A A A KA KA KA KA KA KA KA KA KA K k k kk none KRKA AA AAA A A AXA XXX AA Message Tags FER RARA RRA RARA RRA RARA RARA RARA k k msg_tag write_image BORK KK RR OR OK Constants TKK A A RR RR RR RR kok kok kok kok RARA codedata is the data to be programmed This data came from the nxe file If the first record has a data length of one byte t
31. performed on the Test Board The modification consisted of cutting the reset trace between the MC143120 and MC143150 on the bottom side of the test board then placing a diode along the trace cut with the anode on the MC143120 side Any signal diode such as the 1N4148 will work The diode prevents the MC 143120 reset pulse from reaching the MC143150 Downloading an MC143120 Application To use the prog3120 nc program 1 Compile and debug if changes were made to prog3120 nc program using the LONBUILDER Devel oper s Workbench NOTE This is an MC143150 node 2 Export the MC143120 application with the following settings NEI Motorola S Record fmt Configure file NOTE This is for a MC143120 node and part of this table will be placed in the prog3120 nc application 3 Re format the NEI and paste it into the MC143150 data table under codedata This is the most complicated part of this procedure A program entitled alon exe will reformat the NEI file so that the table can be pasted directly into the code data This program is available from the LonWorks folder on the Design Net bulletin board Motorola assumes no liability arising out of use of this program or any other product or software described in this document The software described in this document is provided on an as is basis and without warranty 4 Re compile the MC143150 node and export the file with the following configuration NRI and Configu
32. r either of the single programmer or gang programmer description HOW THE APPLICATION WORKS The steps to download configuration data and an applica tion are detailed in Motorola s DL159 LonWorks Technology Device Data Appendix B This application note covers only the actual downloading of the application The steps are summarized as follows Take the node off line Set the node applicationless Download the application into the node Reset the node Recalculate the checksum Set the node to the configured state NO of WD Set the node on line 8 Do the final reset This program can be modified to the user s requirements A copy of the program discussed in this application note is enclosed in the folder entitled prog3120 zip on Motorola s Design NET bulletin board Design NET can be accessed through Internet at http motserv indirect com The name of the application program is prog3120 nc It was tested using a Motorola Test Board M143205EVk This kit was convenient because it has a MC143150 and a MC143120 socket This kit is not necessary to run the ap plication program the only requirement is that an MC143150 be connected through a network to the MC143120 The ap plication program is to large for a MC 143120 AN1251 AL 406 A note on the Test Board in order to stop the MC143120 from resetting the MC143150 when a network management reset command is sent a minor modification was
33. red MC143120 Firmware Versions Exporting NEI Files This procedure and application were tested by exporting from LONBUILDER 2 2 software for a Version 3 MC143120 Revisions of the LONBUILDER software may change the way NEI files are written to making alon exe out of date For exporting purposes different versions of the MC143120 are not compatible with each other As of the date of this publi cation most MC143120s in the field are Version 3 with Version 4 being the latest release New versions of the MC143120 will be released as changes to the firmware be come necessary for derivative products or enhancements During the first quarter of 1995 Motorola began production of MC143120s incorporating Version 4 firmware The firm ware in the MC143120 is masked inside the device as ROM and changes will occur infrequently The user may verify which version of the NEURON CHIP he or she is working with by noting the LONBUILDER hardware properties in the field NEURON CHIP firmware If the field reads 0 or is empty it means the application uses the latest LONBUILDER software LONBUILDER Version 2 2 software de faults to MC143120 Version 3 LONBUILDER Version 3 0 soft ware defaults to MC143120 Version 4 The reason different firmware versions will not be compatible is because the pro gram makes calls into the firmware and the firmware changes with revisions For similar reasons a program MOTOROLA LonWorks TECHNOLOGY exported for
34. s 122 bytes Appl Timers amp I O Change Events 4 bytes Network amp Application Buffers 528 bytes AN1251 MOTOROLA LonWorks TECHNOLOGY AL 412 Application RAM Variables 19 bytes Library RAM Variables O bytes Total RAM Requirement 1245 bytes Remaining RAM 803 bytes Required header files none Timing Acknowledgments is used for network memory write commands for downloading bytes to be programmed in T EPROM unacknowledgments otherwise 150 ms timer is used for the memory write commands before the next packet is sent 100 ms otherwise Testing verified 3120 program working Notes Ey node state is different than node mode Node state tells if a applicationless no application or configuration checksum low unconfigured application checksum no configuration checksum Cx configured application and configuration checksum If the configuration or application checksum fails the node goes applicationless Node mode tells if a online b offline the only when statements that work here are reset online offline and wink Timing Since unacknowledge is used load image is a timer that tells when to set up the next packet This may need to be increased decreased depending on clock rate of this node and the receiving node baud rate routers of bytes written to to name a few b To ensure that any node can be written to less than or egual to 16 bytes is written to at a time
Download Pdf Manuals
Related Search
Related Contents
Model 5200 1000 PSI Pressure Probe - Cooper Istruzioni per l`uso Bruksanvisning CDP 75, 125, 165 - Bedienungsanleitung 657.45-R786d T.II-CAPITULO II.2 パーソナルガス検知器 取扱説明書 Les Instructions D`Utilisation Détachant Pour Taches Tenaces et MDC010-050101 Users Guide Technicolor - Thomson DVD Player + TV Set + VCR User's Manual Manual de l`aplicatiu Aplec de Materials - Inici Panasonic FP0R Series PLCs User`s Manual Copyright © All rights reserved.
Failed to retrieve file