== Release 4.0.9 * Fixed: AUTO_PAGING version 4.1 for PIC's. * Fixed: HEX is not created if a compilation error occurs. * HOW TO: Two three phase sine wave based on the hardware PWM https://github.com/LDmicro/LDmicro/wiki/HOW-TO:-Two-three-phase-sine-wave-based-on-the-hardware-PWM * HOW TO: RF (315MHz, 418MHz, 433MHz, 915MHz) modules with PIC's and AVR's https://github.com/LDmicro/LDmicro/wiki/HOW-TO:-RF-(315MHz,-418MHz,-433MHz,-915MHz)-modules-with-PIC's-and-AVR's * New: Added elements UART SEND: Is ready ? Output is 1 when transmit buffer is empty and ready to loading new data. UART RECV: Is avail ? Output is 1 when there are unread data in the receive buffer. 0009|| ; Rung 10 and 11 are equivalent. || || || || Is ready? char || 0010||---[UART SEND]------{UART SEND}--- || || || || Rbusy char Rbusy || 0011||-------]/[----------{UART SEND}-------------------------( )-------|| || || == Release 4.0.7 * HotFix: Bug in releases 4.0.5 - 4.0.6 with AVR ports ottputs. * Added: Atmega2560 can genarate 12 hardware PWM's. == Release 4.0.6 * Fixed: "Save as.." cyclic bug. * Fixed: Restored behavior: to get ADC slider double-click in IO list in Simulation mode. Also ADC slider by double-clicking on the item "READ ADC" in LD editing window in Simulation mode. Right mouse button closes the ADC slider. == Release 4.0.5 * Fixed: Bug with J,K,L ports addreses at ATMega2560. Bug with addreses of ADC at ATMega2560. Tested in Proteus. asm_demo_mega2560.zip contains LD, asm, hex, Proteus7 model. See end of the page: https://github.com/LDmicro/LDmicro/wiki/HOW-TO:-Integrate-LDmicro-and-AVR-Studio-or-PIC-MPLAB-software * Added menu and shortcats: "Insert Contacts: Internal Relay Shift+C" "Insert Contacts: Output pin Shift+L" "Insert Coil: Internal Relay Alt+L" * Added in manual.txt: Note: The several coils with the same 'YName' or 'RName' can be mentally represented as a one microchip with multiple inputs and one output. Normal and inverted input are directly transfers the input state (normal or inverted) to the output. R, S, T inputs lock up (latch) the state of output. The T input is positive edge triggered. R, S inputs are level sensitive. If before R, S insert the "OSR: ONE-SHOT RISING" or "OSF: ONE-SHOT FALLING" you get a "positive edge triggered" element. If used only the R and S inputs you get classic RS-trigger, that may be with more than two inputs. If add T input you get "newest" RST-trigger. May be several R..R inputs, or several S..S inputs. You can use any combination of inputs for one 'YName' or 'RName' coil. See also COIL, T-TRIGGER in Release 4.0.3. == Release 4.0.4 * HotFix: Fixed initialization error of all used banks of PIC's RAM from 4.0.1 version. Not recomended to use with PIC's MCU releases 4.0.1 - 4.0.3. == Release 4.0.3 * Fixed: The page correction error while the correction is crosses boundary page. AUTO_PAGING version 4 for PIC's. * Modified: You can set X input contacts to the HI level before simulating, if in your real hardware device the initial state of X input contacts in HI level. In release 3.5.0 for this feature used symbol '_' after X in contact name. Now for this feature you can use checkbox "Set HI input level before simulation" in contacts dialog. This feature applies only in simulation mode, and does not affect hex file in physical device. This feature refers to MCU inputs, not to the external switches(devices/sources). This feature not refers to negation or normal open NO or normal closed NC contacts of switches. Now you can use symbol '_' in the name to see it better (X_in). * Modified: When selected mode is ("Simulation Mode"), and user presses once the Spase key ("Single Cycle"), or hold down pressed the Spase key("Single Cycle" ), then ladder diagram executes one cycle (or repeatedly) and displayed correctly. When then select "Start Real-Time Simulation" the ladder diagram is in work, but can displayed in the one same condition. This happens only when the cycle time is less than 10 ms and 10 ms, divided by the cycle time gives an even number, and also 10 ms, divided by the timer time gives an even number. There are two causes for this strange behavior. 1) The LDmicro frame rate in "Real-Time Simulation" mode is 10 ms (100 Hz). I.e. the ladder diagram state is displayed every 10 ms, but not the every one cycle. If every 10 ms LD state is the same, then user sees the same picture on the display. Although LD state chenged inside 10 ms over and over again and go back to the same state. 2) I tried to show LD state at a random time within the 10 ms frame. But WINAPI InvalidateRect() function works when there are no other messages in the application queue for that window. And the screen is redrawn also through an even number of times and showing the same picture (LD state). Now LDmicro used UpdateWindow() at a random time within the 10 ms frame. UpdateWindow() function works without a queue and shows different states of LD on the screen and picture is not "latched". Note: The screen refreshes randomly LD state inside 10 ms frame in "Real-Time Simulation" mode. * Fixed: RETURN error in MUL,DIV elements in PIC10xxx, PIC12xx microcontroller family. * Added element COIL, T-TRIGGER. Added in manual.txt: Terminology: "Level sensitive" = output(element) controlled by the level of the input. "Edge triggered" = output changes only at the point in time when the input changes from value to the other. Can be positive edge-triggered (0 to 1), or negative edge-triggered (1 to 0). Most elements of LDmicro are "Level sensitive", some elements are "positive edge-triggered". > COIL, T-TRIGGER Rname Yname ----(T)---- ----(T)---- A coil T-trigger is edge-triggered flip-flop (toggle, tip-over, turn over). A coil flip-flop every rising edge of the input condition (i.e. what the input condition goes from false to true). If rising edge detected, then if coil state is false it is sets true. If next rising edge detected then if coil state is true it is sets to false. This instruction must be the rightmost instruction in its rung. You can simply present as a T-trigger with the positive edge-triggered input. * Added: MessageBox("Rename the ALL other 'N' contacts/coils named 'Name' to 'NewName' ?") after editing the contacts/coils name. * Added: Menu Edit->Cut Selected Element (Alt+Del). Then use menu Edit->Paste Rung's/Element &Into Rung (Alt+Insert) to insert element in new position. * Added: Menu Edit->Replace Selected Element in Group. For example: CTU->CTD->CTC->CTR->... == Release 4.0.2 experimental * Fixed: LDmicro Forum - hex file error http://cq.cx/ladder-forum.pl?action=viewthread&parent=5008 LDmicro Forum - 4.01 hex problem http://cq.cx/ladder-forum.pl?action=viewthread&parent=5410 AUTO_BANKING and AUTO_PAGING version 3 for PIC's. * New: It is possible to add PIC10Fxxx - PIC12Fxxx family microcontrollers in LDmicro. * HOW TO: Soft start and smooth stop of LED with software PWM https://github.com/LDmicro/LDm...-stop-of-LED-with-software-PWM == Release 4.0.1 experimental * Fixed: All banks of RAM can be used. Added message about the amount of RAM used. == Release 4.0.0 experimental * Fixed: CTD down counter in releases from v3.5.2 to v3.5.4 has critical decrement error. INT_DECREMENT_VARIABLE in PIC's MCU has a bug. Note: For BORROW flag, the polarity is reversed a CARRY-OUT flag. A subtraction is executed by adding the two's complement of the second operand. * Fixed: Fragment from forum: ... I loaded the 'hello.ld' and started simulation, then the 'H' of the 1st 'Hello' is dropped... ... Yes, first symbol dropped in UART simulation window. In hardware will be full text. Now all text printed in UART simulation window. SAMPLE\hello.ld added. * New: Variable name that begins with symbol '#' like #PINA, #PINB, #PINC, ... treated as input port. Operation -{ MOV dest, #PINA }- directly assigns 8-bit value from the hardware pins of the port A to the variable 'dest'. Variable name that begins with symbol '#' like #PORTA, #PORTB, #PORTC, ... now treated as output port. Operation -{ MOV #PINA, dest }- writes 8-bit value from the variable 'dest' directly to the hardware pins of port A. Note: The output mode pins of the port is not set automatically. You must set it with operations COIL YPA0..7 (YRA0..7). * Added: Bitwise operation: AND, OR, XOR, NOT. Please read http://en.wikipedia.org/wiki/Bitwise_operation Arithmetic shift: SHL, SHR. https://en.wikipedia.org/wiki/Arithmetic_shift Logical shift to right SR0. https://en.wikipedia.org/wiki/Logical_shift Logical shift to left is equivalent to SHL arithmetic shift to left. Circular shift: ROL, ROR. https://en.wikipedia.org/wiki/Circular_shift Bitwise swap nibbles in a byte SWAP. -{SWAP b, a}- If 'a' is 0xA5, then 'b' will be 0x5A. https://en.wikipedia.org/wiki/Nibble * Added: Operations with one bit: SetBit - set bit ClrBit - clear bit -{SetBit var, bit}- In variable 'var' set bit number 'bit'. 'Bit' means number of bit, not bit mask. For example, to set bit number 4 in variable 'var' v Bit numbers: 76543210 'var' : xxx1xxxx ^ you must write ^ -{SetBit var, 4}- not -{SetBit var, 0x10}- * Added: IfBitSet - If bit set IfBitClr - If bit clear If the input to this instruction is false then the output is false. If the input is true then the output is true if and only if the given condition is true. This instruction can be used to check the state only one bit of the variable. 'Bit' means number of bit, not bit mask. Operation -{IfBitSet var, 0}- is equivalent condition 'If var is odd'. Operation -{IfBitClr var, 0}- is equivalent condition 'If var is an even'. * Added: LED segments displays: 7SEG, 9SEG, 14SEG, 16SEG. https://en.wikipedia.org/wiki/Seven-segment_display https://en.wikipedia.org/wiki/Nine-segment_display https://en.wikipedia.org/wiki/Fourteen-segment_display https://en.wikipedia.org/wiki/Sixteen-segment_display 7 segments display a -- f| |b | g | -- e| |c | | -- . d DP SEGMENT DP g f e d c b a BIT 7 6 5 4 3 2 1 0 7SEG associate bit0 to pin A, bit1 to pin B, bit2 to pin C, bit3 to pin B, bit4 to pin D, bit5 to pin E, bit6 to pin F, bit7 to pin DP. * Added: Bitwise sofrware bus tracer: BUS. BUS is not a vehicle. BUS means bus conductors on the printed circuit board. When you trace route output pins from the MCU port to 7 segment LED display, you can connect any pin of port to any pin of LED display as you comfortable. Then you must set sofrware mapping transformation for bits. For example SEGMENT DP g f e d c b a BIT 7 6 4 5 3 2 0 1 if b<->a and f<->e. * Added: BIN2BCD, BCD2BIN packed operations. https://en.wikipedia.org/wiki/Binary-coded_decimal * Added: Negative NEG, signed variable a = -a. Negative -{NEG a}- is the optimized equivalent to -{SUB a:= 0 - a}- ! Attention: ! You can only add, edit, save, load this elements marked 'EDIT:' in menu. ! No simulation. No compile code at output. * Added: SAMPLE\swatch2.ld - Stopwatch2 with 7 segments LED displays. https://github.com/LDmicro/LDmicro/wiki/Stopwatch2-with-7-segments-LED-displays * Added: SAMPLE\7Segments.ttf. Install 7Segments.ttf in Windows\Fonts and view 7Segments.doc. * Added: SAMPLE\swatch1.ld - Stopwatch1 over UART. https://github.com/LDmicro/LDmicro/wiki/Stopwatch1-over-UART == Release 3.5.4 experimental * Highlight rungs number. * Added menu Select Rung's. * Allow constant value from 0x0000 to 0xFFFF in hexadecimal. == Release 3.5.3 experimental * Remuved lines between rungs. It fix troubles to set the cursor in the instruction with mouse. If you need a delimiter between rungs, you can use an empty comment. * Fixed: Attention! TON, TOF, RTO timers in LDmicro v2.3 are shorter than those specified in the LD file. They shorter at one PLC cycle time. If PLC cycle time is 20 ms and contact bounce about 20 ms you can project schema like this. With anti contact bounce 40 ms. But in fact it was 20 ms. || || || Xstart Tanti_bounce1 _ _ Rwork || ||-------] [---------[TON 40 ms]------[_/ OSR/ \_]--------(S)-------|| || || || Xstop Tanti_bounce2 _ _ Rwork || ||-------]/[---------[TOF 40 ms]------[ \_OSF/ \_]--------(R)-------|| || || Now TON, TOF, RTO produce delays as specified in LD file. In this case it 40 ms. * Added: Specially for generating cyclic signals with a predetermined period and frequency added Cyclic Timer TCY. || || || Rwork Tmeandr Ymeander || ||-------] [---------[TCY 50 ms]---+----------------------( )-------|| || | || || | _ _ Yr_pulse || || +--[_/ OSR/ \_]--------( )-------|| || | || || | _ _ Yf_pulse || || +--[ \_OSF/ \_]--------( )-------|| || || If input signal is true, TCY produce meander with period 100 ms and frequency 10 Hz. If the signal going into the instruction is false, then the output signal is false. Yr_pulse - is pulse at rising edge of meander. Yf_pulse - is pulse at falling edge of meander. Frequency is 10 Hz. Width of pulse is a PLC cycle time. * PIC optimization. WriteRegister(reg, 0) replaced CLRF, reg. == Release 3.5.2 experimental * Fixed: Some user interface bug. * Added: INT_DECREMENT_VARIABLE internal oparation. == Release 3.5.1 experimental * Fixed: Timer0 as PLC cycle in AVR's corrected. * Fixed: If try to change settings for MCU-Parameters, the 'ldmicro-de.exe' gets busy forever and eats up windows memory. * Added: CTR reversive counter added. It like CTC but with decrement counting inside. Added 'Init' value in CTU,CTD,CTC,CTR counters. CTU,CTC counter start from 'Init' and count up to 'Max' value. CTC generate overflow impulse when Counter==Max. CTD,CTR counter start from 'Init' and count down to 'Min' value. CTR generate overflow impulse when Counter==Min. * Attention! You may need to correct the previous versions of the program containing CTD counter! For example: Counter:0 1 2 3 4 5 _ _ _ _ _ CTU >= 5 Input: _/ \_/ \_/ \_/ \_/ \ ___ Output: _________________/ The output CTU counter is true if the counter variable is GREATER than 5 or EQUAL to 5, and false otherwise. * Modified: In CTD '>=' condition changed to '>'. Counter:0 -1 -2 -3 -4 -5 _ _ _ _ _ CTD > -5 Input: _/ \_/ \_/ \_/ \_/ \ _________________ Output: \___ The output CTU counter is true if the counter variable is GREATER than 5, and false otherwise. This modification leads to a symmetric switching of outputs when CTU=5 and CTD=-5. See LDmicro\SAMPLE\ctu_ctd_ctc_ctd.ld == Release 3.5.0 experimental pre-release * Fixed: Address of configuration word(s) are checked and corrected on PIC controllers. * Fixed: On PIC microcontrollers there is bit 7 on OPTION_REG named _RBPU: PORTB Pull-up Enable bit or _WPUEN: Weak Pull-up Enable bit. Defaut value is 1 = PORTs pull-ups are disabled. Now bit 7 is cleared and pull-ups are enabled. Attention: Not all PIC's ports have a pull-up resistors. See datasheets of the controller. Use an external resistor, if there is no internal pull-up. * Modified: Frequency of PWM in Element SET PWM was defined as int targetFreq; now redefined as char targetFreq[MAX_NAME_LEN]; Max value in Element COUNTER and CIRCULAR COUNTER was defined as int max; now redefined as char max[MAX_NAME_LEN]; Now you can use variable as argument of a COUNTER or SET PWM. It allow to create more sophisticated algorithms in LD. * You can specify literals as normal decimal numbers (10, 1234, -56). Added: You can specify hexadecimal numbers (0xA, 0x04D2, 0xffc8), octal numbers (0o12, 0o2322, 0o177710), binary numbers (0b1010, 0b10011010010, 0b1111111111001000) in most places that you could use a decimal number. * Added: You can replace LD elements in editor mode by pressing SPACE key. For example OSR->OSF->OSR, TON->TOF->RTO->TON ets. * Added: Copy-Paste rung's. To select rung's press Shift+Up, Shift+Down, or Ctrl+LeftMouseKey. Then press Ctrl+Insert to write selected rung's into buffer(file ldmicro.tmp). Then in new place press Shift+Insert to insert buffer into LD diagram. For copying only one selected element press Insert, and then Alt+Insert to Pasting element in new place. Selected rungs marks symbol '*' before rungs number. Buffered rungs marks symbol 'R'. Buffered element marks symbol 'L' if leaf end 'E' if ends element. If cursor under the selected element, then buffer will be Pasted below the current rung, otherwise buffer will be Pasted before the current rung. * Added: Open LD file in notepad F4. Its allow you rename variables and contacts in notepad. You must use "replace all" in notepad for renaming. Be careful. Recommended to create reserve copy of LD file before editing. Notepad called over notepad.bat and you can change notepad.bat for calling you favorite editor. * Added: Display scrolling Up/Down/PgUp/PgDown/Home/End. * Modified: Compressed view of LD diagram on display. You can see more in the display without scrolling. ADD, SUB, MUL, DIV redused to one display area on the screen. If variable name more then display area (for example LongNameOfVar), it displayed with symbol '~' as LongNameOf~ and still work. || Xnew {LongNameOf~ :=} || ||-------] [-------{MOV 10}-|| * Reorganized menu. ProcessorMenu2, CmpMenu, SignedMenu added etc. * Added: Used hardware multiplication MUL, MULS, MULSU for AVR's. * Added: Used AUTO_BANKING and AUTO_PAGING for PIC's. Its allows to adding new MCUs more simple. * International System (SI) prefixes used in many places. * In simulation mode You can set inputs to 1 before simulating. vvv Obsolete!!! See Release 4.0.3 vvvvvvvvvvvvvvvvvvvvvvvvvvvv v Use symbol '_' after X in contact name. v v For example: v v Xcontast1 sets to 0 before simulating. (normal open) v ^ Xcontast2 sets to 0 before simulating. (normal open) ^ ^ X_contast3 sets to 1 before simulating. (normal closed) ^ ^ X_contast4 sets to 1 before simulating. (normal closed) ^ ^^^ Obsolete!!! See Release 4.0.3 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This feature applies only in simulation mode, and does not affect hex file in physical device. * Added ELEM_OSC oscillator F=1/(2*Tcycle) * Added: In 'MCU Configuration' dialog you can select timer 0 or 1 for generating of PLC cycle. This allow use Timer1 for PWM or other features. * Added: In 'MCU Configurations' dialog added YPlcCycleDuty pin. YPlcCycleDuty pin set to 1 at begin and to 0 at end of PLC cycle. You can measure frequency(it must be 1/Tcycle) and duty cycle of PLC. If your program is too big for the cycle time, then it will work slower than you expected. Communication with the external environment may be destroyed. Cycle time can be unstable. You can monitor stability and duration of cycle time with YPlcCycleDuty pin. Unstable frequency or big duty cycle says about long LD programm and too short PLC cycle. == Release 3.4.0 * Added: This release include fork https://github.com/f1oat/LDmicro. Compressed bytecodes, Controllino Maxi support, MODBUS support. http://cq.cx/ladder-forum.pl?action=viewthread&parent=5007 MODBUS use RTU over TCP. But that should work also in RS485 mode by linking with the proper Arduino library. Announcing LDuino, an Arduino based PLC software compatible with LDmicro http://cq.cx/ladder-forum.pl?action=viewthread&parent=5070 Controllino is here: http://controllino.biz/ This a nice product. Unfortunately the creator got bad reputation on Kickstarter. https://www.kickstarter.com/projects/24519005/controllino-plc-arduino-compatible/description More information you can get from author of Controllino Maxi support in LDmicro: Frederic Rible Attention! Not compatible with LDmicro2.3, if modbus contacts used. == Release 3.3.1 * Fixed: Error message "Couldn't open file ...." in menu "Compile as" == Release 3.3.0 The backward compatibility still saved. * Fixed: PWM for AVR rechecked and corrected. * Fixed: Now is able to send the full range(0x00..0xff) of unsigned char symbol as hexadecimal numbers in 'Formatted String Over UART' element. Release 3.2.1 raise error with formated strings "\0xFF" and "\0xFE". Release 2.3 can raise error with formated strings "\0xFF" and "\0xFE". Release 2.2 can raise error with formated strings "\0x00" and "\0x01". * Added: LDmicro can generate fully functional ASM code for AVR Studio or Microchip MPLAB software. EEPROM, UART, ADC, PWM are supported too. See https://github.com/LDmicro/LDmicro/wiki/HOW-TO:-Integrate-LDmicro-and-AVR-Studio-or-PIC-MPLAB-software. == Release 3.2.1 * Fixed simulate.cpp error 307. == Release 3.2.0 The backward compatibility still saved. * AVR MCU list sorted in accordance with the Atmel AVR Instruction set inheritance table. https://en.wikipedia.org/wiki/Atmel_AVR_instruction_set#Instruction_set_inheritance This simplifies of adding AVR MCU. * Added Number of internal pseudocode operations for each rungs of ladder diagram. It is shown below the rung number. Added Number of MCU's oparations for each rungs of ladder diagram. It is shown below the internal operations number. Save as text exports its too. You can optimise your code size and speed. * Added readMcu.bat. You can read MCU memory directly from LDmicro IDE with Ctrl+F6 key. (Now only AVR) * Added flashMcu.bat. You can program (flash) MCU directly from LDmicro IDE with F6 key. menu -> Compile -> Call flashMcu.bat F6 is worked for AVR's MCU via AVRDUDE. See https://github.com/LDmicro/LDmicro/wiki/HOW-TO:-Using-LDmicro-and-Arduino-board-without-an-Arduino-software. (Now only AVR) * Added postCompile.bat. It copies LDmicro output files to another directory. Prepare for Arduino and others software. * Added: LDmicro can generate fully functional Arduino C code. EEPROM, UART, ADC, PWM are supported too. See https://github.com/LDmicro/LDmicro/wiki/HOW-TO:-Integrate-LDmicro-and-Arduino-software. Thanks to: Adam Horcica http://adam.horcica.cz/tools/ladder-gen/ http://electronics4dogs.blogspot.cz/2011/07/ldmicro-and-arduino.html Devel http://cq.cx/ladder-forum.pl?action=viewthread&parent=3296 == Release 3.1.1 The backward compatibility still saved. * Fixed internal error at line 222 file 'ldmicro.cpp' (ISA_AVR1). * Fixed Turkish translation. * Fixed 'Formatted String Over UART' SELF-starting error. See http://cq.cx/ladder-forum.pl?action=viewthread&parent=4878 * Added escape sequences: * \t -- horizontal tab * \v -- vertical tab * \a -- alert * Fixed escape sequences in UART simulation window(Terminal). Compared with Windows HyperTerminal and Putty. See demo frmt_escape.ld, added to SAMPLES directory. == Release 3.1.0 * Move an element CTC count from EndOFRung to LeafOfRung. After the counter overflow CTC generate OSR at its output. Format of LD file will not changed. Not need changes for old LD program in this LDmicro realese (backward-compatible). Demo ctc_osr.ld added to SAMPLES directory. TODO: It is necessary to reflect the new features of CTC into manual.txt by native English speakers. == Release 3.0.1 this is input v _ _ _ * Changed symbol ONE-SHOT RISING --[OSR_/ ]-- to --[_/ OSR/ \_]-- ^ this is output v _ _ _ * Changed symbol ONE-SHOT FALLING --[OSF \_]-- to --[ \_OSF/ \_]-- ^ this is input I think that these symbols would be more understandable for beginners. * Changed ANSI_CHARSET to DEFAULT_CHARSET. This will correctly display the national characters in the comments on the screen. * Increase MAX_IO from 512 to 1024. == Release 3.0.0 * Unofficial support: Repository: https://github.com/LDmicro/LDmicro Email: LDmicro.GitHub@gmail.com * Add Japanese translation from https://github.com/snipsnipsnip/ldmicro-jp * Add Russin translation from http://www.vga-avr.narod.ru/, Email:maxxir@rambler.ru * Add SFR function for AVR MCU from http://cq.cx/ladder-forum.pl by Dzairo, Email : dsevc@post.sk, sevc@post.sk * Add Netser Ethernet interface Project http://www.mobacon.de/wiki/doku.php/en/netzer/index from https://github.com/mobacon/ldmicro/commits/netzer == Release 2.3 sfr by http://cq.cx/ladder-forum.pl LDmicro_experimental_sfr02 == Release 2.3 by http://cq.cx/ladder-forum.pl * Fix problem with PWM pin for ATmega16,ATmega32 * Add new MCU : ATmega164,ATmega324,ATmega664,ATmega1284 in DIP40 package need test PERSIST - not working in ATmega16 or 32 * News... (by Dzairo) from http://cq.cx/ladder-forum.pl?action=viewthread&parent=3895 Here are some news in LD micro. I add to LD micro this new MCU: ATmega164,324,644,1284 in DIP40 package. I test all hardware: PWM,ADC,UART work good.. Only one function not working : PERSIST Pls MPG add here some easy example for ATmega32 to test it (this is original code what I not change) and if will working then I try test with ATmega644. I try code after power up MCU to set PWM from variable in EEprom. Ehm.... but in Source code (original ) are some bugs what I find. 1.for avr MCU is setting Interupt bit for timer1 . not need it 2.in mcutable.h MCU PWM pin is 0 for mega16,32 then Idd corect pin in DIP40 this pin is 21 (OC2). This pin is used for mega164,324,664,1284 .. test it and work good. I try add another MCU to LDmicro ATmega48,88,168,328 also.. == Release 2.3 * Fix buffer overrun or write to null pointer if Windows sends an LVN_GETDISPINFO without a valid item.pszText, which happens now under Win10. == Release 2.2 * Fix a problem with the ANSI C target when the program had bit and integer variables with the same name. Note that this changes the names of the symbols in the generated C program; so a system that uses "magic variables" with this target for I/O must be updated to use the new names. * Fix a subtle bug in the PIC16 add and subtract routines, where operations of the form B = A - B could fail. * The piecewise linear tables were broken for the AVRs; fix that. == Release 2.1 * For the AVR UARTs, poll UDRE instead of TXC. The formatted string op was broken on some targets, should now be fixed. * Don't draw selected op in bold font; that looks ugly under Vista. == Release 2.0 * Add PIC16F886 and PIC16F887 targets. * Fix display bug in the list to select an I/O pin. * Fix bug where PIC16 UART locks up forever after a framing error when the cycle time is faster than one byte time. * Fix bug where PIC16 outputs could briefly glitch high at startup. * Clear PCLATH in PIC16 boot vector, since some bootloaders expect that. == Release 1.9 * Modify PIC16 boot vectors to work with many bootloaders. == Release 1.8 * Fix modification of a constant string that blew up in new MSVC++ compiler. * Add Italian, Turkish, Portuguese. == Release 1.7 * Make the source compile with latest version of MSVC++; overloaded functions behave a bit differently. * Recover from (and ignore) UART errors on the PIC16 target, instead of getting stuck forever. * Whenever contacts bound to an output pin (Yfoo) were edited, they reverted to an input pin (Xfoo); now fixed. * Don't abort on too-wide program; instead display nice message. * It was possible (by adding and deleting contacts/coils with the same name) to end up with two bit variables bound to the same physical I/O pin; now fixed. * File -> Open was correct, but Ctrl+O failed to ask about unsaved changes before opening requested file; now both are correct. * Add Spanish user interface strings. == Release 1.6 * Internationalize the user interface strings; we now have versions in English, French, and German. * First source release, under the GPLv3. == Release 1.5 * Add untested support for ATmega32. * Remove annoying lag in user interface when editing large (hundreds of ops) programs == Release 1.4 * Fix a terrible bug in the target for the ATmega8; because there is no PORTA/DDRA/PINA, I broke an assumption in my code and failed to set up the port directions. == Release 1.3 * Timer delays are represented as a signed 32-bit integer count of microseconds. If the user provides a delay >= 2**31 us, then show an error instead of just letting things wrap. * Change the start-up behaviour of TOF timers. Previously they would start from a count of zero, so they would be on (independent of rung-in) until they counted themselves off. Now they start out at full count (as if rung-in has been low for a very long time), so rung-out is low until rung-in goes high. == Release 1.2 * Add an untested target for the ATmega8 * Add a special instruction to simplify piecewise linear tables * Fix some user interface bugs: it was possible to drag the top of the I/O list so high that you couldn't grab it again, and there were some cases in which the pin number associated with UART and PWM variables was not displayed == Release 1.1 * Fix persistent variables, which were broken for the PIC16F628 == Release 1.0 * Fix bug in which the filename that appears in the title bar of the main window failed to get updated when opening/saving a file using the keyboard shortcuts (Ctrl+O/+S) * Fix simulation crash when the ladder logic program divides by zero * Fix jumpy scrolling on programs with many rungs of logic when the cursor is off-screen == Release 0.9 * Fix bug with formatted string op on the AVR * Fix previously-untested ATmega16 and ATmega162 targets, which were completely broken === Release 0.8 * Fix PORTA on the PIC16F819 (came up assigned to ADCs, of course) === Release 0.7 * Support arbitrary character (\xAB) escapes in formatted string op * Fix a bug in which the title bar of the main window was not updated === Release 0.6 * Add formatted text output over serial (e.g. to an LCD or a PC) * Add ability to make variables persistent (i.e. auto-saved in EEPROM) * Add look-up table instructions * Fix a bug with the PORTE pins on some AVRs * Fix miscellaneous user interface bugs === Release 0.5 * Interpretable byte code target * Shift register and master control relay instructions === Release 0.4 * Make ADCs work on the AVRs === Release 0.3 * Support serial for AVR * Support PWM for PIC16 and AVR * Show program filename in title bar of main window * Untested support for PIC16F88, F819, F876 * Generate ANSI C code from ladder diagram === Release 0.2 * Support serial communications (using UART), PIC16 only * Support ADC reads, PIC16 only * Simulation environment for ADC and serial * Support ASCII character constant ('a') literals * Fix PORTA pins in PIC16F628 (should assign as GPIO, not to comparator) * Make file open/save dialogs work under Win98 * Fix PORTA/PORTE pins in PIC16F877 (should assign as GPIO, not to ADC) * Add ability to comment your program * Fix bug when a relative filename is given on the command line and the `Compile As' dialog is later used to specify a destination in a different directory === Release 0.1 Initial release