CONFIG PWM4MX = RB5 ; PWM4 output is multiplexed with RB5
CONFIG PWM4MX = RB5 ; PWM4 output is multiplexed with RB5
Yep I tried that as well. My first post shows CONFIG PWM4MX = RD5 The second post I was just showing the output for meConfig one line of code. Still stumped. Tomorrow I'll try another board with a fresh pic, unless there is something setup in the programming software I'm unaware of.
Plot thickens . I went to my shop today and programmed this simple code to the board and it works fine. I then try and program the same code from my laptop even after uninstalling and reinstalling U2 programming software. Nothing now it won't work. It's got to be some setting that got messed up. I need to be able to program it from my laptop though in the field. Any thoughts?
Code:DEFINE OSC 8 ' DEFINE OSCILATOR SPEED OSCCON = %01111000 '---[CAPTURE COMPAIR MODUALS]--------------------------------------------------- CCP1CON = %00000000 CCP2CON = %00000000 '------------------------------------------------------------------------------- '---[ANALOG CHANELS TO DIGITAL]------------------------------------------------- ANSEL0 = %00000000 ANSEL1 = %00000000 ADCON0 = %00000000 MAIN: SOUND PORTB.5,[100,20] PAUSE 1000 GOTO MAIN END
Ok I found it, there were a couple of configuration bits that for some reason the config setting I originally had didn't work when I launched the programmer. I changed them with the U2 software before programming and now all is well. I guess this is one of those moments where you've been staring at the screen for hours and you mind is starting to get tunnel vision. Thanks for you help
Oh yeah as soon as I get the machine done I'll post some pictures and video of the project as well.
Well I finished up the machine and delivered it. My client is thrilled and has more automated machines he wants me to get started on. But like I said I'd post a little about this project. This machine is for a very progressive framing company that is automating every aspect of their business. This machine will except window and door water proofing seal from 4" to 30" wide and interface with their software over USB. They have an in house software engineer that writes all their custom software to break a job down and minimize waist. Every aspect of their framing is maximized through automation. I worked with him over the internet interfacing my control with his software and after a handful of emails and a couple calls we had it debugged and running. Minus my original post here which was a late night, frustration and a wrong configuration bit.It bites us all at some point. So here is the youtube video of the project in front of my shop.
Also the main PCB and secondary interface PCB for using the DYN4 AC servo drive and all inputs and outputs. I'm using a pic18f4431 on the main board because it's a handy controller with and easy to use quadrature encoder. It's one of my basic boards I always use designed in diptrace. Here are some pictures.
![]()
Last edited by microcnc05; - 29th May 2020 at 23:45.
Bookmarks