How to Control Christmas Lights - How to do almost anything with Christmas Displays.
  August 20, 2008 - Wednesday |Id: Visitor|Login|Prefs|Register| 125 more shopping days until Christmas  
Home
About
Story
Forum
Forum Pro
How To
Photos
Videos
Classifieds
Community
Score Board

High Scorer
Art Colin




HowTo: Build a 16 Ch PicDimmed Renard with SSRs onboard!  (Dave Johnson)


    << Previous Page       Page 1    Page 2    Page 3    Page 4   Page 5    Page 6       Next Page >>

Step 16 : Which PIC?

The short answer is PIC16F688 mouser part number 579-PIC16F688-I/P. The long answer is that, while other versions of the PIC16F699 exist, this part number is sufficient to run within the temperature ranges we expect to see.

Step 17 : To get the firmware onto the PIC:


(If you are familiar with other pic programmers, feel free to email me a few paragraphs, and I can put it in here, as long as it is directly related to the Renard project)

1. Get a pic programming kit (These instructions assume you are using a PICKit 1)
2. Install MPLAB IDE
3. Configure – select device – choose the PIC16F688
4. Programmer – select programmer – PICKit1
5. Programmer – connect to programmer
6. Download the latest Renard code and open it in the MPLAB IDE
7. “build” to create the hex file
8. Using the PICKit 1 program (Named “PicKit 1 Flash Starter Kit”), import the hex
9. “write” to program the PIC, and then “verify” to check that it was a success.
10.
The simplest way to verify that you have programmed the pic correctly is to start with the Diagnostic code, program your PIC. Apply power and ground to Pin 1, Pin 14 respectively. Then attach a LED in series with a resistor (~500Ohms) to pin 13. This is the heartbeat output and the LED should blink on and then off every second.

Step 18 : PIC Output Pins and Channel Numbering

This was taken straight from the comments in the Renard firmware:

PIC PIN # Channel Output
;; PIN 3 (RA4) - triac driver 0 (output)
;; PIN 13 (RA0) - triac driver 1 (output)
;; PIN 12 (RA1) - triac driver 2 (output)
;; PIN 11 (RA2) - triac driver 3 (output)
;; PIN 10 (RC0) - triac driver 4 (output)
;; PIN 9 (RC1) - triac driver 5 (output)
;; PIN 8 (RC2) - triac driver 6 (output)
;; PIN 7 (RC3) - triac driver 7 (output)

In the 16 Channel Renard with SSR design, the channels are numbered 1-8 which correlates to triac driver 0-7 respectively. You will notice there are two banks numbered 1-8 and 1-8 rather than 1-16. This is because each pic has no knowledge of other pics and therefore every pic thinks it is controller channel 1-8. Please see Phil Shorts original how-to to better understand why this is the case.


Step 19 : PIC Input Pins

Again, straight from the comments in the Renard firmware:

;; PIN 2 (RA5) - reserved (maybe for clock input)
In the 16 channel Renard with SSR design I have made provisions for 1/2 size crystal clock oscillator. It may be possible that Phil will release new Firmware to support higher data rates via the serial connection. This part is optional but may be a nice feature to have in the future.

;; PIN 4 (RA3) - zero-crossing (input only)
Please see the section below related to Zero Crossing.

;; PIN 5 (RC5/RX) - uart_in (input)
Please see section below related to RS485 operation.

;; PIN 6 (RC4/TX) - uart_out (output)
Please see section below related to RS485 operation.


Step 20 : RS485 Output Circuitry


U1 = RS485 Chip

The RS485 chip in this specific case is the ST485EBN because Phil favors the low power consumption, but others are pin compatible and slightly cheaper.

Compared with the RS485 input protection circuitry, this is completely trivial.
Just get the polarity right.
RJ45 Pin 5 goes to the RS485 chip pin 6, the A or + terminal
RJ45 Pin 4 goes to the RS485 chip pin 7, the B or – terminal.

Once you go through one of these controllers, there is no longer any discussion about RS232. If you used RS232 into this board, it is now RS485 coming out. End of story.



    << Previous Page       Page 1    Page 2    Page 3    Page 4   Page 5    Page 6       Next Page >>
 

 
Designed, Hosted, and Coded by Hill Robertson
Computer Christmas - Copyright © 2001 Hill Robertson