PDA

View Full Version : SX Firmware Peer Review



lboucher
12-05-2009, 11:42 AM
Hi All

So i built my own boxes based on the SX 28 microcontroller.
Overall things are working good, but there are several oddities.

FYI, this setup just uses TTL serial and data isrelayed from controller to controller. I have 6 boxes total and the max length of each serial line is 35 feet. So i just have 1 - 102 channel renard plugin which sends all data to the first controller which picks of the first 17 data bytes and repeats the rest downstream.

I know i am taking a risk with unshielded ttl level serial, but it is working and i don't think noise is causing any of the problems i am seeing.

So problem 1.

The firmware is designed for 57600 baud with 1 stop bit. When i have all 6 boxes set up i get random channels going on from the 3rd box thru the 6th. The serial between the 2nd and 3rd box is actually the shortest run of them all and I have switched box 2 and still have the problem. The weird part is, everything runs perfect if I select 2 stop bits in vixen. I can controll box 3 straight from a computer using the same cable and it works fine.

Problem 2

If I send values under 5% I get random flashing.

I have attached the firmware if anyone wants to take a look.

Thanks
Lucas

The firmware is designed for 57600 baud with 1 stop bit. When i have all 6 boxes set up i get random channels going off from the 3rd box thru the 6th.

P. Short
12-05-2009, 02:39 PM
I haven't looked at your code, but the first issue might be due to baud rate tolerance issues. If the clock on the PIC is running fast and the clock on one or more of the PICs is running slow, the PIC might be sending data too fast for one of the PICs. Using two stop bits on the first transmitter slows data down enough so that the problem disappears.

lboucher
12-06-2009, 12:17 AM
I haven't looked at your code, but the first issue might be due to baud rate tolerance issues. If the clock on the PIC is running fast and the clock on one or more of the PICs is running slow, the PIC might be sending data too fast for one of the PICs. Using two stop bits on the first transmitter slows data down enough so that the problem disappears.


I assume you meant to say, the clock on the PC is running fast and the clock on one or more of the PICs is running slow?

P. Short
12-06-2009, 10:38 AM
I assume you meant to say, the clock on the PC is running fast and the clock on one or more of the PICs is running slow?

Yes, referring to the respective baud rate clocks.