Results 1 to 10 of 10

Thread: Stupid Question.....PIC

  1. #1
    Join Date
    Jul 2008
    Location
    Pearland, Tx (sometimes) and anywhere on the globe the rest of the time
    Posts
    3,275
    Post Thanks / Like

    Default Stupid Question.....PIC

    Okay,

    In the field modules, what does the PIC actually do?

    What I understand it to do is to recieve the data from the controller module for each of its SSR outputs. It then runs the "dimming" via PWM for each channel while the computer and controller are sending the data to the other field modules. Is this correct?

    Also, it seems that the field modules ID are based on 2 bits. Is there a way to expand this? I am not an ASM programmer so digging into the PIC code is not something I want to do (but will if I have too!).

    Thanks,
    Chris

    PS Any word on when the FGII system info will be done????

  2. #2
    Join Date
    Jul 2008
    Location
    Pearland, Tx (sometimes) and anywhere on the globe the rest of the time
    Posts
    3,275
    Post Thanks / Like

    Default Re: Stupid Question.....PIC

    I now realize that I am replying to my own post....

    However, I have this problem that I need to COMPLETELY understand something as I make it. So, I have loads of questions (parts and copper clad board already delivered).

    1. The previous question seems to be answered yes.
    2. However, how does the field module know when to read in the data? I have traced the circuit back from the jumpers but they simply lead back to the output pins. :confused:
    3. The ASM code has commands in it that are not present the PIC's Data sheet. I am very confused by the "?" in the move & label commands. Could this be an editor issue?
    4. What is the practical limit of this controller? The jumpers in the field module have only 4 possiblities now, but it seems that this could be expanded? Is this a communication timing limit for 128 channels?


    Thanks,
    Chris

  3. #3
    Join Date
    May 2007
    Posts
    5,344
    Post Thanks / Like

    Default Re: Stupid Question.....PIC

    2) There is an address field in the front of each packet. At this point I can't look at the .PCB files (I'm not on a Windows Machine), but the jumpers provide a two-bit address to the PIC on the field module (if I recall correctly), and the PIC uses this two-bit value in conjunction with the address field in the packet to determine if the packet should be read in or ignored.

    3) You need to look up the manual for the assembler, there are a lot of assembler directives that would not be in the PIC datasheet. The .asm file that you see is the output of a compiler, so there is some stuff in there that would not normally be present in a hand-coded asm file.

    4) I think that the number of channels could be increased, by perhaps a factor of two or four (it might be limited by the number of pins on the PIC available for setting the field module address). I'm not sure that anything is actually planned along those lines, though. But this should not be taken as definitive.
    Phil

  4. #4
    Join Date
    Jul 2008
    Location
    Pearland, Tx (sometimes) and anywhere on the globe the rest of the time
    Posts
    3,275
    Post Thanks / Like

    Default Re: Stupid Question.....PIC

    Phil,

    I don't have a schematic of the system but I did open the PCB files. The four jumpers are tied to +5V. Once the jumper is in place the +5V is applied to a resister that is connected to four OUTPUT pins (5,7,8 & 9 i think).

    The confusing part is how an output pin can do PWM output and accept input at the same time.

    Thanks for the reply...this board is not qutie "jumping" at this time of the year I guess!

    Chris

  5. #5
    Join Date
    Jul 2008
    Location
    Pearland, Tx (sometimes) and anywhere on the globe the rest of the time
    Posts
    3,275
    Post Thanks / Like

    Default Re: Stupid Question.....PIC

    Okay, I think I understand as I found this on the Wiki.....

    Serial Data Protocol:
    The serial data consists of three elements:

    A sync character (55h or 85dec)

    A module address (1, 2, 3, or 4)

    32 bytes of dimming level data (64h to C8 or 100dec to 200dec)

    The scync character is not used but can be used for automatically detecting the baud rate. The field module waits for an address (1, 2, 3, 4) and once it sees its address, it stores the next 32 bytes of data into the array used for dimming.
    Pins 5, 7, 8 & 9 are also the Analog input pins (this is inferred from a previous comment that the bidirectional signal is used to send the voltage level back to the PC board..hence analog inputs). I was not aware that they were being used. This is how the PIC "KNOWS" what number it is. It then must send this info back to the PC board (I guess Vixen uses this??) Then, each PIC watches for its module address in the data stream.

    It looks like this would be expandable up to the practical transmission limits of the serial port.

  6. #6
    Join Date
    Aug 2008
    Posts
    14
    Post Thanks / Like

    Default Re: Stupid Question.....PIC

    Quote Originally Posted by g2ktcf View Post
    Okay, I think I understand as I found this on the Wiki.....



    Pins 5, 7, 8 & 9 are also the Analog input pins (this is inferred from a previous comment that the bidirectional signal is used to send the voltage level back to the PC board..hence analog inputs). I was not aware that they were being used. This is how the PIC "KNOWS" what number it is. It then must send this info back to the PC board (I guess Vixen uses this??) Then, each PIC watches for its module address in the data stream.

    It looks like this would be expandable up to the practical transmission limits of the serial port.

    This confuses me slightly. Why not hardwire the field module addresses into the outputs on the PC board? Call anything connected to port1 module1, etc?

    I'm very interested in FG for its bidirectional capabilities. It has been mentioned a few times that it could possibly be used for triggers. Has this been worked on? If not, I'd like to hack into it. Any pointers on how to best go about implementing 'reporting' features into the firmware to occasionally report back a field-modules input states?

  7. #7
    Join Date
    Jul 2008
    Location
    Pearland, Tx (sometimes) and anywhere on the globe the rest of the time
    Posts
    3,275
    Post Thanks / Like

    Default Re: Stupid Question.....PIC

    The PC board only does three things....it converts the RS232 signal to TTL level voltages, supplies +5V to the field Modules and provides the zero cross signal. It does not have any logic built in to it. So "hardwiring" the ports would not really do anything as the PC has no idea what port is which. The jumpers are set in the field modules for flexibilty. If one fails, you simply change it with a new one and set the jumpers.

    You would have to hack the DLL as the bidirectional signal is not used on the PC end. I believe that is KC's work as David mentioned to me that he does not do it.

    What triggers would you want to "create" from the field modules?

  8. #8
    Join Date
    Aug 2008
    Posts
    14
    Post Thanks / Like

    Default Re: Stupid Question.....PIC

    Hey sorry, missed this

    Quote Originally Posted by g2ktcf View Post
    You would have to hack the DLL as the bidirectional signal is not used on the PC end. I believe that is KC's work as David mentioned to me that he does not do it.

    What triggers would you want to "create" from the field modules?

    Well, I was considering using mat-switches and/or IR beams in a haunted house display, and I figured that it could be cool to have the ADC's on the PIC's capture this information locally and relay it upstream to the computer controller.

    Now that I understand the setup better, it seems that running separate wires back to a parallel-based trigger is probably easier. While having inputs on all field modules is elegant, I guess it is uneccessary.

  9. #9
    Join Date
    Jul 2008
    Location
    Pearland, Tx (sometimes) and anywhere on the globe the rest of the time
    Posts
    3,275
    Post Thanks / Like

    Default Re: Stupid Question.....PIC

    Well, to do this, you would need more input pins on the pic for the signal. Either that our use a multiplexing routine for it. Keep in mind that this extra interrrupt work would most likely add to the timing jitter for the PWM timing.

  10. #10
    Join Date
    Aug 2008
    Posts
    14
    Post Thanks / Like

    Default Re: Stupid Question.....PIC

    Gotcha

    Yeah, its clear to me now that I should just run extra trigger wires. It shouldn't be too bad.

    Thanks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •