Ok, for the past few days I've been running the code on the development board using D2 and D3 as the output pins for the PWM - all was fine so I placed the chip in the controller and over the weekend it's been running fine, and with the added bonus that the LDD LED drivers don't sing like they used to when using the hardware generators on the PIC.
So I've now started to add in the next module for the project, serial communications. Thanks to Robert's post in my other thread I've used MisterE's tool to generate the port definitions etc, and after a slight hardware issue with the USB/serial cable used a simple echo program to test the comms - it worked fine, using the Comms tool in Microcode Studio I was able to connect to the port, and whatever I sent from the PC was echoed back in the RX panel...I then opened the current working version of my code and simply inserted the line
Code:
Hserout ["Blues ",DEC(B_PWM * 100)/255, 13, 10] ' Send text followed by carriage return and linefeed
which should simple send the value of B_PWM as a percentage to the PC. However when I compiled the code and ran it, then set the clock to the time the lights were on, the PWM remained at 0 and didn't increase. The RTC ran, and the menu options worked so the code was looping, but for some reason I never got an output from the software pins or the LCD. If I commented out the Hserout line the code works perfectly.
It seems another conflict when running DT's multi_pwm with port C, and again its coms related.
Bookmarks