Home
Prox / RFID
Verichips
Ladder Logic
[interfacing] †
Tube Joints
Key Code From Photo
SolveSpace (3d CAD)
SketchFlat (2d CAD)
Photographs
Miscellany
Resume / Consulting
Contact Me

LDmicro Forum - LDmicro.GitHub news v4.0.0

(you are viewing a thread; or go back to list of threads)

LDmicro.GitHub news v4.0.0 (by Ihor Nehrutsa)
https://github.com/LDmicro/LDmicro/releases/tag/4.0.0

== 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/LDm...2-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
Fri Aug 12 2016, 00:54:41, download attachment build400.zip
(no subject) (by Ihor Nehrutsa)
More readable
Fri Aug 12 2016, 00:55:56, download attachment CHANGES.txt
(no subject) (by MGP)
Wauw, great changes more work to experiment with.

Btw, Ihor you have email!

The emaillink in Ldmicro does not work if you work with Chrome, I think it's better that you only publish your emailadres so we can copy it to our emailprogram.
Fri Aug 12 2016, 04:31:16
(no subject) (by MGP)
Error:

If you (accidentally) click on the "QUAD ENCOD" instruction then the program closes and you lose your work.
Fri Aug 12 2016, 09:52:51
(no subject) (by Ihor Nehrutsa)
Will be fixed
Fri Aug 12 2016, 10:28:14
help (by july)
let me ask 28pin and 18pin ic all are running on ldmicro chip right?
Fri Aug 12 2016, 12:11:01
(no subject) (by july)
countdown does not show negative numbers is that you? show only / +. <> .....
Fri Aug 12 2016, 12:26:23
(no subject) (by july)
test countdown ok but No show negative

control step motor 5 phase
Fri Aug 12 2016, 12:31:10, download attachment 877 OK FOR 400.ld
(no subject) (by MGP)
No, only those who you can select in the menu "settings" -> microcontroller.
Fri Aug 12 2016, 12:53:08
(no subject) (by MGP)
You can't show negative numbers with "value: \3\r\n" only positive numbers.

Negative numbers request a - before the 3 like "value: \-3\r\n"

But there is a bug in CTU
The CTU count only to 4 and the "true" value is 10.
Fri Aug 12 2016, 13:12:02
(no subject) (by MGP)
I found another strange thing, in the simulation the serial
output prints all the value's of C1 (program of July, above)
When C1 = 4 then it prints 4 times, if C1 = 2 then it print 2 times, even with a OSR instruction between.

I wonder if you can use the same name (C1) for the CTU and CTD as July did in (his)(her) program, I don't think so...
Fri Aug 12 2016, 13:41:34
7segment (by smei)
hi Mr.Ihor Nehrutsa iam using ldmicro 4.00v how to use 7segment
counter 0 to 9999 and decimal point 99.99,9.999,999.9 this type counter how to use plz then edit to 9999 segment bilking option i need.ld micro using very good .iam using 16f886 this counter using memory 97% ld micro 2.3v how to decrise memory
Sat Aug 13 2016, 00:50:06
help (by july)
16f913 pic 28pin have to work on is not ldmicro
Sat Aug 13 2016, 01:47:43
LDmicro.GitHub news v4.0.1 (by Ihor Nehrutsa)
https://github.com/LDmicro/LDmicro/releases/tag/4.0.1

== Release 4.0.1 experimental

* All banks of RAM can be used.

and some little corrections.
Tue Aug 30 2016, 08:44:46, download attachment build401.zip
(no subject) (by luckysunday)
Bank error test pic16f877
Thu Sep 1 2016, 04:17:31
(no subject) (by Ihor Nehrutsa)
to luckysunday

Yes, errors are possible when selecting banks and pages in PIC:(
This piece of code is less tested.

Please publish your ld and screen shots and I work to fix this error.

If you do not want that your file to be available in the forum, you can submit it directly to [email protected]
with 'between ourselves' mark.
Thu Sep 1 2016, 04:59:10
(no subject) (by Ihor Nehrutsa)
to luckysunday

And if you are developing a model of your device in Proteus, model will be very helpful to me during the testing a program.
Thu Sep 1 2016, 05:04:15
quad encoder (by tinny)
how to use quad encoder function?
Sat Sep 3 2016, 04:26:15
How to get LDmicro 4.0 (by samad)
hello

i all ready download the file but there no Ldmicro.exe file
so i cannot run the LDmicro how to solve this please

TQ
Tue Dec 26 2017, 13:28:51
Post a reply to this comment:
Your Name:
Your Email:
Subject:
(no HTML tags; use plain text, and hit Enter for a line break)
Attached file (if you want, 5 MB max):