Propforth v5.5 is available for download

1192021222325»

Comments

  • caskazcaskaz Posts: 936
    edited June 17 Vote Up0Vote Down
    Rebuild 6legs-robot(FOLO) to Line-trace-robot.


    There is original movie of FOLO in HP.
    https://www.elekit.co.jp/product/MR-9107
  • Rewrote code of NeoPixelRing.

  • Rewrote code of inifinityLED.
    Actually almost same code as NeoPixelRing.

  • I wrote IR decoder.
    Prop0 Cog6 ok
    irAnalyze
    NEC format
    Received data:B847FF00
    CustomCode:FF00
    Data:47
    
    NEC format
    RepeatCode
    
    NEC format
    Received data:F807FF00
    CustomCode:FF00
    Data:07
    
    NEC format
    RepeatCode
    
    NEC format
    Received data:E51A4086
    CustomCode:4086
    Data:1A
    
    NEC format
    Received data:E31C4086
    CustomCode:4086
    Data:1C
    
    AEHA format
    Received data:48 bit  F012_00CF5AAA_00000000_0000
    CustomrCode:h5AAA
    Parity:hF
    Data:hF01200C
    
    AEHA format
    Received data:48 bit  E013_00CF5AAA_00000000_0000
    CustomrCode:h5AAA
    Parity:hF
    Data:hE01300C
    
    AEHA format
    Received data:48 bit  D010_00CF5AAA_00000000_0000
    CustomrCode:h5AAA
    Parity:hF
    Data:hD01000C
    
    AEHA format
    Received data:48 bit  C011_00CF5AAA_00000000_0000
    CustomrCode:h5AAA
    Parity:hF
    Data:hC01100C
    
    SONY format
    Received data:12 bit 11A0_0000
    Address:7bit 08
    Data:5 bit  h001A
    
    SONY format
    Received data:12 bit 11A0_0000
    Address:7bit 08
    Data:5 bit  h001A
    
    SONY format
    Received data:12 bit 1180_0000
    Address:7bit 08
    Data:5 bit  h0018
    
    SONY format
    Received data:12 bit 1180_0000
    Address:7bit 08
    Data:5 bit  h0018
    
    SONY format
    Received data:15 bit B454_0000
    Address:7bit 5A
    Data:8 bit  h002A
    
    SONY format
    Received data:15 bit B454_0000
    Address:7bit 5A
    Data:8 bit  h002A
    
    SONY format
    Received data:15 bit B456_0000
    Address:7bit 5A
    Data:8 bit  h002B
    
    SONY format
    Received data:15 bit B456_0000
    Address:7bit 5A
    Data:8 bit  h002B
    
  • Controlled FOLO by IR-remocon.

  • Updated to FOLO_0.2.
    FOLO_0.1 had bug cause stack-overflow on cog1.
    And IR-remocon changed.
    Changed code to turn R-key(L-key) to right(left) on back-walking.
    1024 x 1024 - 58K
  • Thanks for all your entries to this thread that seems to have become very quiet, except for your exceptional entries.
    Infernal Machine
  • caskazcaskaz Posts: 936
    edited September 18 Vote Up1Vote Down
    monochrome-printing.

    Processing2
    Loading bmp-file(768x1024pixels)
    Converted grayscale-file(384x512pixels)
    Calculeted Error diffusion method
    Packed 1byte/8pixels
    Transmitted data(1st:12000byte, 2nd:12576byte) to PropForth

    PropForth5.5
    Received data(1st:12000byte)
    Transmitted data to ThermalPrinter(width:384dots=48byte)
    Requested next data
    Received data(2nd:12576byte)
    Transmitted data to ThermalPrinter


  • Modified monochroPrint.
    A little bit fast.
  • Peter JakackiPeter Jakacki Posts: 7,715
    edited September 19 Vote Up0Vote Down
    Nice!

    I remember in the very early 90's interfacing to an Apple Imagewriter printer ..... in reverse! In fact the printer wasn't connected but the Mac would print a tenant directory and I would extract the graphics I needed to send over networked RS-485 to kilometers of fireproof cable snaking up and down to high and low rise lifts in an office building to dual graphic display panels arranged vertically as one tall graphic display. This was all programmed in Forth and I think it only used a 65C02 with a version of my Forth. At other times I have written to various thermal printers as well.

    I looked at how your code could run in Tachyon, a bit like this:
    \ Send command to ThermalPrinter
    \ ( nn-nm n1 -- )   nn-nm:data if needed  n1:command 
    \ uses: wvariable ESC_2 -2 allot 2 c, 0 c, h1B c, h32 c,
    \ Tachyon table method ....
    \               cnt  ext  string
    \ TABLE ESC_2     2 | 0 | $1B | $32 |
    : prtcmd
    ---        cnt    ptr                     0/1 n1
            DUP C@ OVER 2+ FROM                     \ index from 3rd element
            FOR I C@ Transmit NEXT                  \ Serial out command
            1+ C@ ?DUP IF FOR Transmit NEXT THEN    \ Serial out data
    ;
    
    I like to try coding an equivalent program in Tachyon from whatever language I see interesting code, just so I can identify strengths and weaknesses and continue to improve Tachyon. If I send you some code would you like to try it out? I could package it all as a binary if you prefer.


    Tachyon Forth - compact, fast, forthwright and interactive
    useforthlogo-s.png
    --->CLICK THE LOGO for more links<---
    Latest binary V5.4 includes EASYFILE +++++ Tachyon Forth News Blog
    P2 SHORTFORM DATASHEET +++++ TAQOZ documentation
    Brisbane, Australia
  • Peter JakackiPeter Jakacki Posts: 7,715
    edited September 19 Vote Up0Vote Down
    Seems that there isn't much actual code that needs to run and it turns out to be very simple in Tachyon. I did keep the unused printer commands but converted them to a simpler form. Maybe this will run on your system although it probably needs a reduced EXTEND to free up 12K although I could easily use EEPROM or an SD file for buffering. (EDIT: EXTEND has been rearranged so that now if you FORGET TOOLS you will have more than enough room)

    I loaded this in and it took 164 code bytes.
    TACHYON V5
    
    ( serial for  ThermalPrinter )
    9       := RXDPRT
    10      := TXDPRT
    
    ( PC DATA )
    26      := TXD232
    27      := RXD232
    
    : RS232			115200 SERBAUD KEY: RXD232 SERIN ;
    : PRINTER		9600 SERBAUD TXDPRT HIGH EMIT: TXDPRT SEROUT ;
    
    : ESC ( n -- )		$1B EMIT EMIT ;
    
    {  ------------ OPTIONAL CODES (not used) ------------
    
    	: code437               't' ESC 0 EMIT ;
    	: code850               't' ESC 1 EMIT ;
    	: ATR ( on/off n -- )	ESC 1 AND EMIT ;
    	\ Set bold font ( on/off -- )
    	: BOLD			$20 ATR ;
    	\ Set double-width ( on/off -- )
    	: DOUBLE		IF $0E ELSE $14 THEN ESC ;
    	\ Set character updown ( on/off -- )
    	: UPDOWN		$7B ATR ;
    	\ Set reverse mode  ( -- )
    	: REVERSE		$1D EMIT 'B' EMIT 1 AND EMIT ;
    	\ Set font size  ( n -- ) n:font size  7<n<24
    	: FONT			$1D EMIT '!' EMIT EMIT ;
    	\ Set start-position to left
    	: LEFT                  0 'a' ATR ;
    	\ Set start-position to center
    	: CENTER                1 'a' ATR ;
    	\ Set start-position to right
    	: RIGHT                 2 'a' ATR;
    	\ TAB (6 blank char)
    	: TABULATE              5 'B' ATR ;
    	\ --- ESC ! ---
    	\ Set small character
    	: SMALL			1
    	: CHAR			'!' ATR ;
    	\ Set emphasized mode
    	: EMPHASIZE	        8 CHAR ;
    	\ Set Double height mode
    	: TALL			$10 CHAR ;
    	\ Set	Double width mode
    	: WIDE		       $20 CHAR ;
    	\ Set underline
    	: UNDERLINE	       $80 CHAR ;
    	\ Cancel ESC !
    	: PLAIN	               0 CHAR ;
    }
    
    \ Receive print-data from PC
    : RxData        RS232 HERE FROM 12288 FOR RXD232 SERIN I C! NEXT ;
    
    \ Print bitmap
    : dotPrint
            PRINTER HERE
            2 FOR
    	$12 EMIT $2A EMIT 128 EMIT 48 EMIT 10 ms
              128 FOR
                48 FOR DUP C@ $FF XOR EMIT 1+ NEXT
              NEXT
            NEXT
            DROP
    ;
    
    \ Receive bit-data to print(24576byte:384x512dots)
    : monochroPrint
            PRINTER '@' ESC				\ INIT PRINTER
    	$37 ESC 5 EMIT 100 EMIT 40 EMIT		\ n1(max heating dots)=5 n2(Heating Time)=50 n3(Heatin Interval)=40
            $12 EMIT $23 EMIT $FF EMIT              \ Change density
    	RxData  dotPrint			\ Receive 1st print-data
            60 TXD232 SEROUT			\ Request next print-data
            RxData dotPrint				\ Receive 2nd print-data
    	CON					\ return to console
    ;
    END
    {
    Code bytes used = 164
    Name bytes used = 102
    }
    



    Tachyon Forth - compact, fast, forthwright and interactive
    useforthlogo-s.png
    --->CLICK THE LOGO for more links<---
    Latest binary V5.4 includes EASYFILE +++++ Tachyon Forth News Blog
    P2 SHORTFORM DATASHEET +++++ TAQOZ documentation
    Brisbane, Australia
  • I tried to speed up ThermalPrinter.
    Downloaded tool from Adafruit.
    https://learn.adafruit.com/mini-thermal-receipt-printer/downloads

    There is 'AclasTool.exe' inside update_firmware.zip.

    Change from 9600 to 115200 is successfull.
    But dotprint is NG because print-speed still is slow.
    It seems to need flow-control.
    4320 x 3240 - 1M
    4320 x 3240 - 1M
  • kwinnkwinn Posts: 7,973
    edited September 20 Vote Up0Vote Down
    caskaz wrote: »
    I tried to speed up ThermalPrinter.
    Downloaded tool from Adafruit.
    https://learn.adafruit.com/mini-thermal-receipt-printer/downloads

    There is 'AclasTool.exe' inside update_firmware.zip.

    Change from 9600 to 115200 is successfull.
    But dotprint is NG because print-speed still is slow.
    It seems to need flow-control.

    Limited speed to be expected due to the mechanical systems. Print head heating elements need time to heat up and cool down before the print head moves, and carriage/print head movements take some time, so not much if anything is gained by higher baud rates.
    In science there is no authority. There is only experiment.
    Life is unpredictable. Eat dessert first.
  • Peter JakackiPeter Jakacki Posts: 7,715
    edited September 20 Vote Up0Vote Down
    Yes, thermal printers can have one wide stationary head and print very fast or they can have a scanning head which is cheaper but slows things down a lot.

    From the Adafruit manual:
    Some printers arrive from the factory set for 19200 baud, but a few may be set to 9600. This will not negatively impact
    the performance of your unit! The speed of the paper through the printer is already much less than this and you will
    not see any difference...it's strictly a data protocol issue of getting the microcontroller and printer communicating.

    Tachyon Forth - compact, fast, forthwright and interactive
    useforthlogo-s.png
    --->CLICK THE LOGO for more links<---
    Latest binary V5.4 includes EASYFILE +++++ Tachyon Forth News Blog
    P2 SHORTFORM DATASHEET +++++ TAQOZ documentation
    Brisbane, Australia
  • Speedup is successfull to add RTS signal.


    4320 x 3240 - 1M
  • Printed out lena.

    lena is successfull.
    But lena-full is bad.
    Image of legs-part is strange.
    First half image(1st:12288byte 2nd:12288byte) are ok.
    Latter halfimage(3rd:12288byte 4th:2496byte) are bad.
    I have no idea although it seems sending data from Processing2 are strange.
    4320 x 3240 - 2M
    4320 x 2880 - 2M
  • The problem is that you are dealing with "raw" data :)

    Tachyon Forth - compact, fast, forthwright and interactive
    useforthlogo-s.png
    --->CLICK THE LOGO for more links<---
    Latest binary V5.4 includes EASYFILE +++++ Tachyon Forth News Blog
    P2 SHORTFORM DATASHEET +++++ TAQOZ documentation
    Brisbane, Australia
  • Modified lenafull_0.2.f.

    RTS is Lo when printer is busy.
    But it seems too late.
    : Ready? 1 delms begin RTSm ina COG@ and 0= until ;
    
    In case of dog.bmp, delay must be more than 1delms because of many dark-dots.
    4320 x 3240 - 2M
Sign In or Register to comment.