Loading ...
Sorry, an error occurred while loading the content.

Smartsockets for AVR Processors

Expand Messages
  • curwenx
    Hi, Has anyone made any effort to port the smartsockets firmware to Atmel AVR processors? The reason I am asking is that I am selling a four tube IV-17 based
    Message 1 of 6 , Dec 11, 2011
    • 0 Attachment
      Hi,

      Has anyone made any effort to port the smartsockets firmware to Atmel AVR processors?

      The reason I am asking is that I am selling a four tube IV-17 based clock kit that uses an Atmega328P processor. It is a modular design, and the plan is to add support for other tubes later on (I have prototypes for IV-6, IV-18 and IV-22 tubes).

      The firmware for the clock is open source, and quite simple: Just time (DS1307 RTC), alarm, brightness settings etc. - nothing fancy. TX,RX and I2C (SDA,SCL) pins are broken out on the board. Programming it requires a generic AVR programmer with an 6-pin ISP port.

      I think running smartsockets on it would be very cool. How portable is the code, and how much of it relies on PIC functionality?

      The ideal thing would be to keep the AVR-specific stuff (such as multiplexing code, VFD driver code, RTC code, button input code etc) from the current firmware and then port the more generic things such as fonts and display code, but the details will depend on how the smartsockets code is structured.

      Here are the links to the code and firmware:
      Clock: http://www.akafugu.jp/posts/products/vfd-modular-clock/
      Firmware: https://github.com/akafugu/VFD-Modular-Clock
    • fixitsan2
      I don t think anyone has done it, yet. An example of the best code is probably the B7971 code in the files section (cersion 2). That was my starting point for
      Message 2 of 6 , Dec 11, 2011
      • 0 Attachment
        I don't think anyone has done it, yet.
        An example of the best code is probably the B7971 code in the files section (cersion 2). That was my starting point for the IV-17 Smartsocket. As you're already multpilexing you just need to time slice the effects and store 4 sets of values instead 1 (The zm1350 device drives only one zm1350, the IV-17 version drives 4 tubes)

        I don't think any of the code is pic specific, the B7971 smartsocket ASM file is in the files section and probably just needs converting to Atmel-speak.

        I don't have any Atmel devices, I was always satisfied with pics and assembly and a change to Atmel and assembly didn't seem to bring any obvious benefits

        Chris

        --- In smartsockets@yahoogroups.com, "curwenx" <curwenx@...> wrote:
        >
        > Hi,
        >
        > Has anyone made any effort to port the smartsockets firmware to Atmel AVR processors?
        >
        > The reason I am asking is that I am selling a four tube IV-17 based clock kit that uses an Atmega328P processor. It is a modular design, and the plan is to add support for other tubes later on (I have prototypes for IV-6, IV-18 and IV-22 tubes).
        >
        > The firmware for the clock is open source, and quite simple: Just time (DS1307 RTC), alarm, brightness settings etc. - nothing fancy. TX,RX and I2C (SDA,SCL) pins are broken out on the board. Programming it requires a generic AVR programmer with an 6-pin ISP port.
        >
        > I think running smartsockets on it would be very cool. How portable is the code, and how much of it relies on PIC functionality?
        >
        > The ideal thing would be to keep the AVR-specific stuff (such as multiplexing code, VFD driver code, RTC code, button input code etc) from the current firmware and then port the more generic things such as fonts and display code, but the details will depend on how the smartsockets code is structured.
        >
        > Here are the links to the code and firmware:
        > Clock: http://www.akafugu.jp/posts/products/vfd-modular-clock/
        > Firmware: https://github.com/akafugu/VFD-Modular-Clock
        >
      • curwenx
        Hi, The next question is, are anyone interested in an atmel version? I apologize for insufficient research on my part: I had assumed that there would be C code
        Message 3 of 6 , Dec 12, 2011
        • 0 Attachment
          Hi,

          The next question is, are anyone interested in an atmel version?

          I apologize for insufficient research on my part: I had assumed that there would be C code available. I am not familiar with PIC assembly, so I have no idea if porting it to AVR is feasible. What about the code I see running on the four IV-17 tube devices linked in many of the posts here? Is this not publicly available?

          -Per


          --- In smartsockets@yahoogroups.com, "fixitsan2" <fixitsan@...> wrote:
          >
          > I don't think anyone has done it, yet.
          > An example of the best code is probably the B7971 code in the files section (cersion 2). That was my starting point for the IV-17 Smartsocket. As you're already multpilexing you just need to time slice the effects and store 4 sets of values instead 1 (The zm1350 device drives only one zm1350, the IV-17 version drives 4 tubes)
          >
          > I don't think any of the code is pic specific, the B7971 smartsocket ASM file is in the files section and probably just needs converting to Atmel-speak.
          >
          > I don't have any Atmel devices, I was always satisfied with pics and assembly and a change to Atmel and assembly didn't seem to bring any obvious benefits
          >
          > Chris
          >
          > --- In smartsockets@yahoogroups.com, "curwenx" <curwenx@> wrote:
          > >
          > > Hi,
          > >
          > > Has anyone made any effort to port the smartsockets firmware to Atmel AVR processors?
          > >
          > > The reason I am asking is that I am selling a four tube IV-17 based clock kit that uses an Atmega328P processor. It is a modular design, and the plan is to add support for other tubes later on (I have prototypes for IV-6, IV-18 and IV-22 tubes).
          > >
          > > The firmware for the clock is open source, and quite simple: Just time (DS1307 RTC), alarm, brightness settings etc. - nothing fancy. TX,RX and I2C (SDA,SCL) pins are broken out on the board. Programming it requires a generic AVR programmer with an 6-pin ISP port.
          > >
          > > I think running smartsockets on it would be very cool. How portable is the code, and how much of it relies on PIC functionality?
          > >
          > > The ideal thing would be to keep the AVR-specific stuff (such as multiplexing code, VFD driver code, RTC code, button input code etc) from the current firmware and then port the more generic things such as fonts and display code, but the details will depend on how the smartsockets code is structured.
          > >
          > > Here are the links to the code and firmware:
          > > Clock: http://www.akafugu.jp/posts/products/vfd-modular-clock/
          > > Firmware: https://github.com/akafugu/VFD-Modular-Clock
          > >
          >
        • fixitsan2
          ... I m sure a lot of people would be interested in an Atmel version Per.I could probably turn my hand to it if I ever get the time to learn Atmel assembly
          Message 4 of 6 , Dec 12, 2011
          • 0 Attachment
            --- In smartsockets@yahoogroups.com, "curwenx" <curwenx@...> wrote:
            >
            > Hi,
            >
            > The next question is, are anyone interested in an atmel version?
            >
            > I apologize for insufficient research on my part: I had assumed that there would be C code available. I am not familiar with PIC assembly, so I have no idea if porting it to AVR is feasible. What about the code I see running on the four IV-17 tube devices linked in many of the posts here? Is this not publicly available?
            >
            > -Per

            I'm sure a lot of people would be interested in an Atmel version Per.I could probably turn my hand to it if I ever get the time to learn Atmel assembly (heard it is generic, unlikle the pic RISC version) but I really have too much to do.

            I don't think there is any C code anywhere. I learned C at university but prefer to use PicBasic Pro as my high level glue language to assembler. The code is no longer publicly available for commercial reasons.

            The Smartsocket requires a host device to send messages to it. if you're an Atmel fan then you could buy the prepgrogrammed pic Smartsocket chip from me and use your Atmel skills to write code for yoiur host device.

            One of the underlying principles behind the design of the Smartsockets has been to make it easy for programmers to offload any and all display specific coding. You could write your own font and effect, but there is a chance at least some of what you want is already cheaply available with the Smartsocket.

            i am selling complete IV-17 kits with tubes, kits w/out tubes, programmed controllers on their own and probably pairs of pcb's on their own. I imagine it is childsplay to use a kit and replace the pic with an Atmel and write your own Smartsocket code, if you're inclined that way.

            Nice to hear from you
            Chris
          • curwenx
            The PIC chip is controlled using an UART right? I have plans to add a slave mode to my clock kit as well (as an optional firmware), and that is what I thought
            Message 5 of 6 , Dec 12, 2011
            • 0 Attachment
              The PIC chip is controlled using an UART right? I have plans to add a slave mode to my clock kit as well (as an optional firmware), and that is what I thought would be a cool use of smartsockets. My plan is to write it as an I2C slave, but adding serial would be simple too.

              Having a pre-programmed PIC chip to play around with is probably a good idea too. I'll get back to you on that if/when I have time.

              If I do start a port I think it would be best to do it in generic C to be easily portable to just about any platform: If I understand your code correctly, it should be possible to make everything generic, and then have a runslice function called from a uC timer that would take care of display animation.

              Is there a specification for the smartsockets protocol available somewhere?

              --- In smartsockets@yahoogroups.com, "fixitsan2" <fixitsan@...> wrote:
              >
              >
              >
              > --- In smartsockets@yahoogroups.com, "curwenx" <curwenx@> wrote:
              > >
              > > Hi,
              > >
              > > The next question is, are anyone interested in an atmel version?
              > >
              > > I apologize for insufficient research on my part: I had assumed that there would be C code available. I am not familiar with PIC assembly, so I have no idea if porting it to AVR is feasible. What about the code I see running on the four IV-17 tube devices linked in many of the posts here? Is this not publicly available?
              > >
              > > -Per
              >
              > I'm sure a lot of people would be interested in an Atmel version Per.I could probably turn my hand to it if I ever get the time to learn Atmel assembly (heard it is generic, unlikle the pic RISC version) but I really have too much to do.
              >
              > I don't think there is any C code anywhere. I learned C at university but prefer to use PicBasic Pro as my high level glue language to assembler. The code is no longer publicly available for commercial reasons.
              >
              > The Smartsocket requires a host device to send messages to it. if you're an Atmel fan then you could buy the prepgrogrammed pic Smartsocket chip from me and use your Atmel skills to write code for yoiur host device.
              >
              > One of the underlying principles behind the design of the Smartsockets has been to make it easy for programmers to offload any and all display specific coding. You could write your own font and effect, but there is a chance at least some of what you want is already cheaply available with the Smartsocket.
              >
              > i am selling complete IV-17 kits with tubes, kits w/out tubes, programmed controllers on their own and probably pairs of pcb's on their own. I imagine it is childsplay to use a kit and replace the pic with an Atmel and write your own Smartsocket code, if you're inclined that way.
              >
              > Nice to hear from you
              > Chris
              >
            • fixitsan2
              ... Yes that sounds cool. ... Yes that s how it s done. ... Not an official spec. The command list is in the files section for the relevant smartsocket
              Message 6 of 6 , Dec 13, 2011
              • 0 Attachment
                --- In smartsockets@yahoogroups.com, "curwenx" <curwenx@...> wrote:
                >
                > The PIC chip is controlled using an UART right? I have plans to add a slave mode to my clock kit as well (as an optional firmware), and that is what I thought would be a cool use of smartsockets. My plan is to write it as an I2C slave, but adding serial would be simple too.
                >

                Yes that sounds cool.


                >
                > If I do start a port I think it would be best to do it in generic C to be easily portable to just about any platform: If I understand your code correctly, it should be possible to make everything generic, and then have a runslice function called from a uC timer that would take care of display animation.


                Yes that's how it's done.


                >
                > Is there a specification for the smartsockets protocol available somewhere?
                >


                Not an official spec. The command list is in the files section for the relevant smartsocket devices. I usually specify a 5mS period wait after sending a command before sending another command, but for a lot of the commands this is very pessimistic and most commands can be sent serially with a much smaller delay than 5mS

                There are no start characters or end characters, the data packet is trapped and only valid data is interpretted. There is no checksum
                function, but I have had no data corruption issues. A checksum function could be added easily and users can be given the option to use it or not, I suppose.


                Chris
              Your message has been successfully submitted and would be delivered to recipients shortly.