Windows serial to PIC 16F877 plotter engraver at 19200 Baud

This page was last modified:
This is a hobby page of someone with the lowest possible technical education (automobile an metalwork)
Do not believe everything i say or write, i could be wrong
Dutch is my mothers language and i find dutch hard enough=> so thats why the scrappy englisch
Micro
Something new!, not so new, but for me it is new
latest page changes:
zaterdag 10 april 2004 added a low quality movie to this page
dinsdag 20 april file added 40mhz/115200baud
woensdag 21 april 2004 added a second movie
september 2004 added a new forum for questions, answers, suggestions, discussions, guestbook, poll.
SignGo Vinyl Cutting software
If you change the pic code a little => Build your own vinyl cutter
SignGo verry nice vinyl cutting software with configurable output to serial port
also see http://www.luberth.com/help/pen_plotter_vinyl_cutter_swivel_knive_drag.html
I need HELP?!
=> Earn / Get 50 U$D => if you help me get Xon / Xoff flowcontrol to work flawless on 18f452 and mplab C18 / (Maestro?)
Windows_serial_to_PIC_16F877 (18f452) plotter_engraver_at_115200_Baud
Saw the webpage at http://cryolite.ath.cx/i/pcb-router
And was curious how this would work
So i bought a Pic16f877 and a programming device =(+-35) Euro
Would have been better to buy pic18f452 wich has the same pin layout
Can run at 40mhz and has more program memory
AND Microchip has a C18 C-Compiler Demo for the 18xxxx series (all for 1usdollar more)

Pic 18f452 is a 40 pin microcontroller upto 40Mhz Clockspeed 10 milion instructions per second
32k FLASH (16K) code
256 bytes EEPROM
1536 bytes RAM
33 I/O pinnen waarvan (8 analoog 10bit A/D),
UART, 3 timers, 2 x PWM, I2C,
Microchip has 60day demo C18 C-compiler for this 18f452 (C-compiler Priced 392 Euro = too much for me)
Farmers explanation of the pic
the pic is a microcontroller
when you buy one its empty/blank and does not do anything
you need to burn a program in the pic microcontroller
this program is a *.hex file human unreadable (like *.exe on the pc)
hex files are made out of assembler or for example basic pascal c compilers
assembler is like writing a letter with your feet practice does wonders
c compilers are much easier
so need to make a program in c compile that to a *.hex file
and burn that program into the pic microcontroller using a programmer (bit of hardware that connects to the pc and the pic)
and if the program is correct the pic microcontroller wil start running
doing what it is programmed to do => 10 milion instructions per second
Pinout image 18f452
I like the fact that this hardware allows Linux, Mac, Windows
or any other multitasking OS to control steppers via serial line
Because timing is done by the Pic
original (http://cryolite.ath.cx/i/pcb-router) Windows program talks to the pic16f877 running at 4mhz at 2400Baud
Would like to make a lot of changes
But that will be hard for me to do => in assembler
So i need a C-compiler
8 maart 2004 => Samples requested http://sample.microchip.com/
Great!!! => maadag 29 maart 2004 Microchip 18f452 samples have arived
and 2 hours later the table is moving
Forwarded 1 sample 18f452 to Mathijs a dutch student (wants to make an engraving machine of a scrap autosampler)
Microchip has a 60 day fully functional C compiler demo for 18xxx devices
http://www.microchip.com/1010/pline/tools/picmicro/code/mplab18/index.htm
(C-compiler Priced 392 Euro = too much for me (Why are the pic C compilers so high priced 300 to 1000 usd))
GREAT!, This C is much better/easier then ASM
Microchip PIC part of project
my_example1_test_mcc18_pic18f542.zip = vrijdag 12 maart 2004 ( 3axis linear interpolation)
PStep_mcc18_pic18f542_3_april_2004.zip
Above zip files need New MPLAB® IDE and MPLAB® C18 v2.20
Pc part of project
PStep_VisualBasic_simple_hpgl_viewer_code.zip 17 maart 2004
maandag 5 april
got visual basic program working a little sendig hpgl drawing xy to pic
pic performs these xy motion commands well
PStep_VisualBasic_9_april_2004.zip Mathijs helped a little how to use mscomm
cannot get 115200baud working on a 10Mhz*4=40Mhz (maybe because of 4 x error of a 10mhz )
will try a 40Mhz Quartz
so 57600baud is the fastest for now
Pc and Pic part of project
PStep_VB_and_PIC_13_April_2004.zip 10mhz*4 57600baud
Found an old big 4 pins 40Mhz quartz on a old 500Mb scsi harddisk
Had to figure uit how this works quartz needs 5vdc and ground and only 1 output to Pic => OSC1 = pin 13
osc2 is left unconnected or could be configured for other use
M1280.pdf pinning for the 4 pin quartz
orange wire +5vdc
bleu wire gnd
black wire output to pic OSC1
finally 115200baud
PStep_en_VisualBasic_40mhz_no_pll_115200_21_april_2004.zip
PStep_en_VisualBasic_40mhz_no_pll_115200_22_april_2004.zip
Download directory
machine specs:
standard 12x3 trapezium spindels & bronze-nuts (www.overtoom.nl) (not preloaded yet & no backlash compensation)
200steps /1,8degree motors
1/10th microstep = 10pulses for a full step
theoretic 1 steppuls from pic18f452 to gecko stepperdriver is 3mm / (200steps/rot. * 10 microstep) = 0,0015mm
First PStep engraving

## Low quality movie cstep.luberth.com.WMV

=> note: all xyz moves are slow this is not max. speed
second engraving with 40mhz quartz and 115200 baud
Movie

## picgirl.WMV movie

=>Loads of (delicate curves ;-)smal line segments
Some Dutch spraypaint the black back off gravoply red, so he has new cheap testing material, Scrooge
Should spend some time to remove freeplay from nut and spindle
Then the result will be much better
Yes sure!?, start with the right depth (see E)
hpgl file outline created with eagle pcb designer
Design your board with Eagle
then use => file => run => outline.ulp (Creates the outline HPGL plotfile )
or use => file => run => mill-outline.ulp (more advanced as outline.ulp)
Eagle pcb designer demo => http://www.cadsoftusa.com/
some hyperterminal test screens
serial connection the pic18f452 talks to the PC
400thousand (400000 micro)step-pulses => 3 axis interpolating in 5 seconds
for x 99milion steps => hmmm, whats the use my table is only 350thousand microsteps wide
but it works well with long
Looks like the Pic performs better as that i had thought
Hate to say it, but i think this is a better setup as the DOS computer
its strange
to watch tv on the pc,
hear that you have new mail,
and are browsing the internet with 9 mozilla windows
having mplab, acrobat ,hyperterm msvc and a few other programs running
and still serial exe and the engraving table is running smooth
first messy try
second a little bit better try
in circuit programmer connected to print and com1 (much easyer re/programming of pic this way)
pic16f877 upgraded to 18f452 connected to max232 and com2
i didnt have a 33kohm resistor => thats why the messy series of 3x10k an 1x 3k3 in series
so the setup is as next
a windows computer
connects via com 1 and com2
to programmer and pic16f877 upgraded to 18f452
because there is a free c compilerdemo for 18f452
and this compilerdemo is not crippled to int => allows longint
the pic16f877 ( upgraded to 18f452)connects 3steppulse and 3direction lines to 3 axis stepper driver
and the 3 axis stepperdriver connects to the xyz engraving table
links (of similar boards)
The page that made me curious 16f877 => http://cryolite.ath.cx/i/pcb-router Author of the ASM code i use
Turkey language pcb driller Pic 16f877 opensource EDU project
MAXIMUS - CNC PCB DRILLING MACHINE
http://ogrenci.hacettepe.edu.tr/~b0164043/maximus/index.htm
16f877 upgraded to 18f452=> http://www.techlf.com/cnc8am-eng.php3
18f452 => http://www.kellyware.com/max_stepper/max_stepper.shtml
18f452 => http://deskam.com/desknc_WIN.html
Uses a DS275 instead of MAX232
http://www.jrkerr.com/
low cost PIC Development boards
PIC 18f452 development board
PIC Development Package => http://www.sparkfun.com/shop/index.php?shop=1&itemid=173 OR http://www.olimex.com/dev/
I cannot get it to work with the programmer included
and the programmer is awfull slow
and i get a lot off times verify errors
so make the delays longer and programming takes more time (verry slow)
They call it in circuit programer => but you have to disconnect all before you can start programming
so the http://www.voti.nl wisp programmer is better/faster then this one (but has an uglier user interface dos command)
but advance is it doesnt freeze your windows
next is not same (as i first thought)
http://magiist.free.eplanet.hu/index.html
XYZ Penplot/Drill XYZ Table
80c31 8 bit microcontroller
http://www.turbobit.com/xyz/xyz.html
MicroStepper Stepperdrives
Bipolar Microstepping with
Microchip pic18f452
application note AN822
Pic and L298 or L6203
http://www.microchip.com/download/appnote/pic16/00822a.pdf
Microchip pic16f84
LMD18425
bipolar Microstepping
55volt 3amp
http://www.embeddedtronics.com/microstep.html
added 9pin sub d info
why 10=t2in and 8=r2in connected to ground?
part of schematic of original http://cryolite.ath.cx/i/pcb-router
zip file on that page http://cryolite.ath.cx/pics/pcb-router.zip
PIC pcb Drill
http://www.elex.camosun.bc.ca/programs/2001/PCBDrillTable/drilltable2.htm
MAX233 better as MAX232
The dallas ds275 has less pins and NO external capacitors
Coopers GarageSale
SubScribe
To the NewsLetter
and be notified of
PageChanges
september 2004 added a new forum for questions, answers, suggestions, discussions, guestbook, poll.
P-Step & CStep® ©Copyright 2003-2004 Luberth Dijkman Bangert 23 Andijk The Netherlands Europe
This page was last modified:

? | Animated Gifs | X