PDA

View Full Version : VM142 velleman mini PLC



MikkelH
- 9th October 2009, 12:56
I have got a VM142 module with a pic16f630. there was not much hardware information about it included in the "manual"(No diagram).
so if you intent to get it running yourself with picbasic, you can find help here.
The Pickit2 programmer fits direct to the ICSP connector
'
'
' Pinout pic16f630
' ---------------------
' 1 ----- VDD VSS ------- 14
' Diagnose LD3 2 ----- RA5 RA0/ICPDAT ------- 13 In4
' 3 ----- RA4 RA1/ICPCLK ------- 12 In3
' In1 4 ----- RA3/MCLR RA2 ------- 11 In2
' out1 5 ----- RC5 RC0 ------- 10 PIEZO
' out2 6 ----- RC4 RC1 ------- 9 Relay+LD1
' out3 7 ----- RC3 RC2 ------- 8 Out4
' --------------------
'
'
' pinout for ICSP programming
' PIC pin Connector SK2 pickit2
' 4 -------- MCLR ------ 1 ---- MCLR
' 1 -------- VDD ------- 2 ---- VDD
' 14 -------- VSS ------- 3 ---- VSS
' 13 ------- ICPDAT ----- 4 ---- DAT PGD
' 12 ------- ICPCLCK----- 5 ---- CLK PGC
'
'************************************************* ***************
include "bs2defs.bas"
define osc 4
@ device pic16f630,INTRC_OSC_NOCLKOUT, wdt_on, mclr_off, protect_off
cmcon=7 'digital inputs
'setting the port directions
trisA=255
trisC=0

' Velleman vm142 PCBtext
InA var portA.3 'in1
InB var portA.2 'in2
InC var portA.1 'in3
InD var portA.0 'in4
OutA var portC.5 'out1
OutB var portC.4 'out2
OutC var portC.3 'out3
OutD var portC.2 'out4
Piezo var portC.0
Relay var portC.1
LD3 var portA.5 'LD3

Best regards Mikkel H

vtt-info
- 13th October 2009, 16:01
Hello Mikkel,

here the wiring diagram for the VM142 has made I myself.

Best regards,

vtt-info