rev73: add the deadmaster time and add the response delay. rev72: add the baudrate 57600. rev71: speed up the t3-32in scan input rate. rev69: add heart beat register to check the communication is smooth. rev68: add the command to change the id when there is id confilct. rev67: when receive the scan command , add the serie number. rev66£º open the protect function flag. rev65: enable to change the filter function. just for T3-32IN. rev64: This rev is just for T3-32IN. which is not affect the other T3 moudles. 1.switch the channels after we finish the reading adc routing. 2.we will read twice when channel is 0 ,8,16 , 24. we will throw away the data when frist read. The frist time read is tell pin swich the channels. The second time we can get the steady data. rev63£º 1.get rid of the filter for 3 second set up . 2.when the range is set to 4 or 5 for digit inputs , it will bypass the filter. rev62£º As the customer request to speed up switch , it cause the channels cross talk. so we slow down the switch speed . rev61£º add serial number protect for all T3 project¡£ rev60£º speed up the refresh inputs routing 100ms to 50ms. rev59: add new range for new type sensor. range 17 to read C range 18 to read F. REV58: change data buffer lenght to 40 for support multple write. rev57£º add the range for the Sensor LM235. rev56£º fix the spiking issue by add flag in the filter function. rev55: add more range to input. 0-5v ,0-10v,0-100ma, 0-20ma. T3-32: apply new filter to make the input data changing much more smoothly. rev54: for t3-32in : set the range to 10 can make the channel skip to read. rev53: speed up refresh roution¡£ seems to fix datanab issue. wating for confirm. rev52 for HD8: for 8in13out hardware rev8. rev52: for 8AIAO : fix channel8 output jumping. for 8IN13 : delete the error setting language in write the year function. rev51: change the value 500 to 1 to decide swtich on or off the relay. rev50: add delay in output function to make the output goes low fast. delay output function in the write command to aviod crosstalk foR 8AI8AO. change the way to deal with data for 8IN13OUT, there is no jump. rev49: add calibration for each input. Rev48: add range parameter 8 and 9 set for different types 3 thermistor. 8 = type 3 thermistor 10K Celsius,9 = type 3 thermistor 10K Fahrenheit. REV1-47 Change the heart time 5ms to 2.5ms REV1-46 ADD Communication register 19. defulat is 0 = 5ms. 1 = 10ms. rev1-45 combine rev37 to 44 feture. rev1-44 copy from the rev 1-39, change the filter range to 255. rev1-43 copy from the rev 1-37 ,change the code read pic rev from pic. rev1-42 copy from the rev 1-41, add the manual for input. rev1-41 copy from the rev 1-37, move the filter of reading pic as customer wants. REV1-40 FOR 8AI 8AO. REV1-39 COPY FORM REV1-37 . fix rang problem. Rev1-38 add the datanab hardware using #IFDEFS //Revision 1-37 11-15-10 MHF //For T3_32ai Changed filtering to check for bad PIC readings even when input filtering is set to zero //The T3_8ai13ro and T3_32incode will detect PIC version to decide the protocol,can use new and old pic code. //Revision 1-36 10-25-10 MHF //Fixed t3_8ai13ro filtering method,same with T32ai. //Improvet38ai13ro action speed on relay output For PIC rev30 and later only. //Revision 1-35 8-05-10 MHF //Fixed a bug which read register start from 10 will cause a lot of timeout error //Two ways filter input for T38AIO module,first get average and get rifd of min and max value in 10 reading,then use normal filter math same with tstat is using. //Revision 1-34 7-15-10 MHF //Added a flag for pic reading for 8IOA to ensure communication correctlly. //initialize range and filter parameters for 8IOA //Fixed filter,ignore big error between two readings //Fixed read modbus register 0 through 20 bug //Revision 1-33 18-05-10 MHF //improve pulse input respond speed , related to lighting control but also geneally improves DI response time. //Revision 1-32 13-05-10 MHF //Imprioved RS2323 response time to 30ms approx, was 250ms in rev31. //Revision 1-31 10-05-07 MHF //Fixed LED filcker problem //Revision 1-30 10-05-05 MHF Fix read pic data routine,get rid of debug information and correct checksum //Revision 1-29 10-04-16 CHELSEA -Fix I2C communication -improve pulse counting speed to approx 100hz when using latest Pic rev9 (You can see the PIC revision number by reading register 09 in the T3 module) //Revision 1-28 10-03-31 MHF //Fixed random reset timer bug in override output mode //Improve update input speed //Revision 1-27 10-03-23 HYF //Reset T3-module when the commucation locked up for the time set in register 17(seconds) //If the value in register 17 being set 0, this function is disabled //added 13 registers show status of override relay output //Revision 1-26 10-03-18 MHF //For T38IO13RO, Reset timer for each hit button,HOA switch is top priority //Revision 1-25 10-03-10 MHF //For T38IO13RO, fixed relays turn on/off automaticlly bug,fixed override timer mode. //will count the hit number till up to 10,then ignore other hit.the override timer will be // 10 mutiple the timer set in timer register. //Revision 1-24 10-03-09 MHF //For T38IO13RO, set the input as high speed pulse input when the corresponding input be configed //as lighting control to improve button respond time //Revision 1-23 10-02-07 MHF //Read two inputs for each PIC reading,once when analog value less than 900 triger an event //Fixed can not turn off relay bug in lighting control mode,relocated xdata memory to resolve this //Revision 1-22 09-12-30 MHF //Added lighting control for t38ai13ro module. //Revision 1-21 09-11-30 MHF //Update the version number to 21 //FIxed range setting can not be written problem //Each inputs added a filter for T3_8ai13ro module,register 191 through 198.Fixed PIC(T38AI13RO) code to //improve sample speed //Revision 1-20 09-09-24 MHF //Show -100 when no temp sensor attached on inputs,instead of 0 or 32F //Revision 1-19 09-09-14 MHF //Fixed added a new range for all inputs, the coresponding range register be set 6 means //the inputs is high speed pulse.only for T38AI13RO. //Revision 1-18 09-09-01 MHF //Fixed the routine write configuration to PIC when power up //Added multiple write for range setting //Added average filter for all modules except T3_32AI //Put all data into RAM before send the data through serial port to short gap between bytes //Revision 1-17 09-07-30 MHF //Fixed hand switch output error //Revision 1-16 09-03-16 MHF //Add a define for LUIS,use 0 and 1 insteatd of 500 to operate relays. //Revision 1-15 08-11-26 MHF //Store the default baudrate to flash before the user configure the baudrate. //Revision 1-14 08-11-14 MHF //Fixed filtering bug. //Revision 1-13 08-11-03 MHF //Update input LED using the second analog reading(register 175 to 182) //Added range register for T3_8I_16DO,register 128 through 135 correspond input 1 through input 8 //Added range register for T3_8AI,register 118 through 125 correspond input 1 through input 8 //Added range register for T3_32IN,register 228 through 259 correspond input 1 through input 32 //Revision 1-12 08-10-28 MHF //Added register 183 through 190 for input range setup for T3_8I_13DO.0 = raw data,1 = 10K Celsius,2 = 10K Fahrenheit ,3 = 0 - 100%,4 = ON/OFF,5 = OFF/ON //Fixed clear pulse counter problem //Revision 1-11 08-10-18 MHF //Added 8 registers(175 - 182) for dual reading ,the value of these registers srored data sampled from all channels whatever the channnel be configed as analog or high frequent pulse mode //Added CRC for the communication between PIC and MCU,for compatible for olD hardware with smaller PIC chip,need compile the code cprrerspondly to disable defined CRC or eanble defined CRC //Revision 1-10 // Revision notes for T3-8IOD // --------------------------------------------------------------------- // MHF 09-29-2006 Added control LEDs feature for HSC. // MHF 09-29-2006 Get rid of the filter for analog input because the customer feel the action is too slow // MHF 07-20-2007 Added a filter for HSC to get rid of huge error. // MHF 08-07-2007 Shorten the time store data to flash when a clear command from serial port // TBD: Add a filter for each analog input //Revision 1-9 //GW 06-06-04 // - change the filtering algorithm (pic.c: void store_to_registers (unsigned int pic_data, unsigned char register_location) // - slow the sample speed //TBD notes: // initialise to verify // - eventually we want a code that will be able to fit all modules // - thus we can change through registers the amount of inputs and outputs // - need to add a register so that we can change the parameters for filtering // - want to verify documentation. seems that it says if you write to register above 500, will trigger output... // - want to have modbus.h file such that in modbus things are always the same but in the Goal things can be moved around at will // Revision notes for T3-8IO // --------------------------------------------------------------------- // Revision notes for T3-8IN16OUT // --------------------------------------------------------------------- // Revision notes for T3-32IN // --------------------------------------------------------------------- // tried to compile in different optomization // observed that some worked other didn't // what seemed to work best was optomize speed level 9. //Version 1-7 // RL 06-03-01 // - changed goal flash routine. incorporated code made by Robert, which I then modified to put in Solar // Robert // - added new pic code protocol for 8 channel // - high speed counter // - improved on the pic detect scheme // RL 06-03-20 // - rectified problem: at power-up noticed relays would first turn on. // RL 06-end of march // - tried to remove the use of registers 17 and above. They are reserved registers for all TEMCO's product // - address not stored properly. Problem rectified // // Version1-5 // RL 05-11-15 // - fixed the T3-32in for flexdriver feature. Noticed that could not run the code with the // calibration feature even though it compiles properly through KeilC // RL 05-12-06 // - sent a setup for Kevin (RP circuits) and all worked well... problem found with communication lines... // RL 06-01-23 // - discrepancy with documentation. Now in Auto mode, if register reads bigger than 500 than will activate relay // RL 06-02-06 // - added baud rate change //Version 1-6 // RL 06-02-27 // - added auto-detect pic chip // - removed "copy to flash" code ISP related // RL 06-02-28 // - attempt to reduce time in improve on network health. Removed arithmetic, and used shifting. Increased priority // - made serial address as argument. performed in dealwithData // - removed EEP_baudrate, felt it was best to leave it at register 15 // - improved on response in 9600 baudrate // Version1-4 // RL 05-10-07 // - will be implementing new memory flash management done by robert // RL 05-11-04 // - problem found for T3-32in module. Software compiles fine but upon power-up, module freezes immediately // Version1-3 // RL 05-07-26 // - started to add code for TransducerPWM volts // - cleaned up the code to make it more organized // MDF 05-08-11 // - Made many little changes to enable the T3-8IOA version. "|| (T3_8IO_A) had to be added to maybe ifdef statements // - Input MUX must be re-enabled after writing to output MUX. // - ENABLE12V must be switched on at startup. // // MDF 05-08-12 // - Changed primary heartbeat pulse to 19. this made the pulse more exactly 50ms. // - Created check_digital_inputs() for PWM_TRANSDUCER. This function scans the digital inputs and translates the pulse into 0-1000 values // // RL 05-09-02 // - first attempt to apply calibration grid to all inputs individually // RL 05-09-07 // - attempted to add another goal_flash routine // Version1-2 // RL 05-06-09 // - now can read software version number, register 3 and 4 (got rid of eeprom version number) // - had hardcoded the model numbers // Revision notes for T3-8IO // --------------------------------------------------------------------- // RL 05-06-20 // - added code for benny feature. noticed needed old PIC code which I have removed since ver1-1 //Rev1-1 // RL 04/04/05 // - filtering has been modified, now placed in PIC chip as well // - big ticks has been made faster to allow PIC com more reliable // Revision notes for T3-32IN // --------------------------------------------------------------------- // RL 05-05-20 // - finalised the code for the 32IN and added a ifdef option for the FlexDriver routines // - pic chip has been modified, it now responds by interrupt // - rectified communication with the pic chip // --------------------------------------------------------------------- // RL 05-05-25 // - read pic routine has been modified and now responds as an interrupt // - modified the analog_input_buffer logic as well, does not transfer a pointer anymore but just a value // RL 05-06-01 // - added the scan function (CHECKONLINE) and plug-and-play feature // Version 2 // MDF 6/25/04 changed the timing of responses to valid and invalid packets. // 4ms needed to recover from invalid packet. 10ms delay when responding to a valid packet. // serial1.c, IO_8.c, serial.h // MDF 6/25/04 Increased the MUX-open delay when writing an output. This greatly // increased the speed at which the outputs rise and fall. // IO_8.c // MDF 7/15/04 Moved switch checking to a separate routine named switch_check(). // This routine runs every 25ms and adds filtering to filter out noise. // IO_8.c // RL 08/11/04 // - Finished writing the testing algorithm. // - changed the timing for refresh input to make it faster // - added output_sequence address register to control testing on/off // increments and decrements at intervals of 100mv // - modified code in refresh led, refresh input/output mostly // - added code for the digital hardware boards, if analog board, comment out the // define RELAYBOARD above in this revision.h file // - added code for the testing of digital hardware boards // flicks relay on and off on the outputs // RL 9/28/04 // - multiple write added // - note feature to write to pic chip has been added as well, for now used for wdt purposes // RL 10/28/04 // - enabling/disabling of Global interrupts on the read_pic() causes the LED's to flicker. // removed lines from the pic.c file and changed the pic chip software so as it does not timeout // too quickly. // RL 11/11/04 // - have noticed that on start up relay will be flicked on, hardware initialization // thus I have added a line to ensure that they remain OFF throughotu initialization steps // - added hardware rev function. // RL 15/11/04 // - added a pulse to the switches to make it robust to flickering... note will need to remove it later // on newer version of LEDboard 14 // RL 18/11/04 // - added memory storage when doing ISP. NOw only has laddress in it. If more data... need to do memory allocation // RL 17/01/05 // - added software rectification such that the module will read 0 for a ground input // RL 22/02/05 // - started to combine all T3 module codes together into one. To set look at defines in "LibIO_T3IO.h" file //Rev 1-0 // RL 01/03/05 // - has merged all T3 modules together in one code now, need to modify the define in LibIO_T3IO.h file // - relay are called by variable names and not Pin numbers anymore SilLabsRev1 This has the bacnet work that Mahmoud did. I think just start with this code and forget about SilLabsRev0 But possibly it would be good to merge rev0 and rev1, we definitely need modbus AND bacnet protocols. Rev 1-12 organize the structures and files to be more re-usable We will copy the 11 version which is in produciton and get it cleaned up then use some of the files for the new T4 version. Rev 1-10 changed the display to fit on the hardware of T3-8-13 ,and the ouput function for 13 relays Rev 1-1 ----------------------------------------------------------------------------------------------- modified the filtering routine which required to modify the Pic routine as well Rev 1-0 ----------------------------------------------------------------------------------------------- First version where all T3-module codes were put together need to look into the Lib_IO.h file to configure to proper modules