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 - Help me ... with correct drawing..

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

Help me ... with correct drawing.. (by Dzairo)
Hi all..

Today I test my experimental version LDmicro.
I use SFR function to controll I2C IO expander PCF8547
I do it but:

problem is :- max serial instruction in one rungs is possible only 15 , I change to 32 and work.
Work but not corect draw last elemnts in rungs.
I try change any constants in LDmicro.h DISPLAY_MATRIX_Y_SIZE and DISPLAY_MATRIX_X_SIZE but still not working .. can help me with this ..

look to my example .. work it .. I use atmega328p with 8Mhz internal RC , I use I2C IO expander and controll LED .. working good.. now need help only with correct drawing elemnents ..

pls help with this ..

where is problem?? how to simulate LDmicro in Visual studio??
Fri Jun 6 2014, 03:56:23, download attachment LDmicro experimental04.zip
correct drawing (by J R)
Hi Dzairo,

modify these lines and check again

#define DISPLAY_MATRIX_X_SIZE 16
#define DISPLAY_MATRIX_Y_SIZE 512

#define MAX_ELEMENTS_IN_SUBCKT 16
#define DISPLAY_MATRIX_Y_SIZE 512

new values

#define DISPLAY_MATRIX_X_SIZE 256
#define DISPLAY_MATRIX_Y_SIZE 2048

#define MAX_ELEMENTS_IN_SUBCKT 256
#define DISPLAY_MATRIX_Y_SIZE 2048

best regards
Fri Jun 6 2014, 10:56:55
(no subject) (by Dzairo)
Hi.
J R still same problem.. I do it change in ldmicro.h

#define MAX_ELEMENTS_IN_SUBCKT 256

#define DISPLAY_MATRIX_X_SIZE 256
#define DISPLAY_MATRIX_Y_SIZE 2048

few last elemnts are bad draw.. you must see it self .. you see it ??

there is another problem .. and I don't know what.. hm...

I need minimum 24 element in one rung ..

I2C work .. work stable , fast .. can controll 127 devices .. IO expander , RTC, LCD ,ADC , DAC .. etc.. easy and fast ..

need help with this ..
Fri Jun 6 2014, 13:07:34
(no subject) (by Dzairo)
Hi J R .. I solve problem .. draw_outputdev.cpp
ehm.. problme was ini Bitmap generated after show windows ..maximum size was 2000 .. redefined to 4096 and now bitmap is created in memory with this minimum size..
this set to 64 maximum MAX_ELEMENTS_IN_SUBCKT 64.

now change maximum rung from 99 to 999

on first I must test it ..

see you tomorrow..

and still need help with simulation windows for me SFR function.. my idea is to make new windows wit 256 cell ..
and this cell will be position in ram .. (for simulation only) .
then we can simulate my SFR function..

and I have idea to add new one function SLF special logic function for 8bit only .. AND,NAND,OR,NOR,XOR,Invert , Shift LEFT, SHIFT Right..

see you ..

best regards
Fri Jun 6 2014, 13:26:53
(no subject) (by Dzairo)
Hi J R .
I try make simulation but not work.. hm... who can help wit this ??
I do not understand how simulation work then I can not make this part of code..

I can add new instruction , elements but problme with simulation..


here is complete source code.. try it self.
what we need to if simulate ??? nothinkg .. no operation..
Fri Jun 6 2014, 14:21:07, download attachment LDmicor experimental 05 SFR.zip
(no subject) (by David R)
HI I have been using LDmicro-999 rungs for quit a while and all good with it
here is the forum link

http://cq.cx/ladder-forum.pl?action=viewthread&parent=2399

Kind Regards
David
Fri Jun 6 2014, 16:49:07
(no subject) (by dzairo)
hi David .

I make ldmicro for 256 only. I thinks that is it OK.
999 rung is really big logic .

now make more example for I2C .. and then make new logic function. and implement native code for I2C using .. more easy .

best regards
Fri Jun 6 2014, 17:44:44
simulation (by J R)
Hi Dzairo,

I have tested latest ldmicro and it is possible to start the simulation but only with 16 elements in one rung.

For showing the actual value of variable in state window, you must assign an name for each SFR variable like names of timers or counters.

for example: timer TON ----------- name "T1"
SFR write to 50 ----- name "50"
SFR read from 49 ---- name "49"

best regards
Sat Jun 7 2014, 09:23:49
(no subject) (by Dzairo)
Hi J R .. sorry .. but I don't understand what you mean..
If make new project and add only one instruction (for example write to SFR) then try simulate .. and stop .. show error..

not working ..

I don't know how to solve this problem..

how to assign new wariable??

write more .. or make example..
Sun Jun 8 2014, 05:23:47
(no subject) (by Dzairo)
Hi J R .. sorry .. I know what you mean .. you mean can not use literal by literal .. because must associate variable before.. hmm.. this is bigger problem .. how to solve this .. I can disable literal to literal but this is not good..

then if use wrtie SFR to any variable then all is OK .. but if use wrtie to SFR literal to literal.. then error..


how to solve this ..
Sun Jun 8 2014, 05:46:24
simulation (by J R)
Hi Dzairo,

the simulation work but we need to see actual value of each register where we write or read. These values we need to see in state window.

best regards
Sun Jun 8 2014, 06:43:05
video wit simulation (by J R)
Sun Jun 8 2014, 07:00:41
video wit simulation (by J R)
pass: goro
Sun Jun 8 2014, 07:03:11
(no subject) (by Dzairo)
Hi J R

hm... I don't know but if input value use variable from counter then simulation halt .. show error.. I don't know ..


still don't know how to assign vairable .. state window ..
how it work??? really .. I'm totaly crazy .. why not working..
in your simulation work .. but if try do it self then not..

make *.ld file and send to me pls..
Sun Jun 8 2014, 11:44:08
simulation (by J R)
Hi Dzairo,

the file you see in my video is atmega8_digital_power_supply.ld
Sun Jun 8 2014, 13:24:29, download attachment atmega8_digital_power_supply.ld
(no subject) (by J R)
Hi Dzairo,

the simulation work but we need to see actual value of each register where we write or read. These values we need to see in state window.

best regards
Sun Jun 8 2014, 14:07:55, download attachment ex1.PNG
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):