zeke

Members
  • Content count

    1,671
  • Joined

  • Last visited

  • Days Won

    83

Everything posted by zeke

  1. This is my approach to state machines. Your mileage may vary. Determine all of the sub-systems that you will want to service Commands, Controls and Inputs, User Interface, and Data Setup a system tick timer that fires its interrupt on a regular consistent basis. This system doesn't have to go into LPM4. If it does then periodically wake up the system and cycle through the software service loops then go back to sleep. Setup a series of service flags that are set during the interrupt service routine and cleared after being serviced: Flag(s) for Commands, Flag(s) for Controls and Inputs, Flag(s) for User Interface, and Flag(s) for Data Setup a variable that acts like the system timer odometer. Every Odometer == (DesiredInterval%ServiceFlag_n_now) set the ServiceFlag_n Decide how often you will service the other functional blocks of your code. For example, Update the 2x20 LCD display every one second, or Update the Serial Console every 250ms, or Retrieve the Temperature from a sensor every 15 minutes. Setup an Interrupt Service Routine to catch any characters coming into the Serial Port Buffer. Stuff them into the Input Ring Buffer Set a flag that there's something to service. In the main loop, scan all of the service flags to see if any are set. Call the servicing function for each set flag. Clear the service flag at the end of that process. Configure the program to repeat continuously until Kingdom Come. I've left out significant details about setting up all of the peripherals and general variables so don't forget to do that stuff. This is just the basic gist of my state machines on a bare metal level.
  2. I've never gotten the interrupt driven I2C Master to work reliably but I have gotten the interrupt driven I2C working like a charm. I've done this working on the 2955, the 2553, and the 5529. I've used a state machine to divide up all the functionality between the I2C, the Serial IO, and the GPIO. It's weird to realize that I have never used the ADC nor the PWM yet.
  3. Hi Inscribe. I have all of them still. I will figure out a price and let you know.
  4. Hi Everybody! I have eight or nine clock ring PCBs here that I am thinking of selling. This is what they look like with the LEDs installed: This is what they look like in operation: This is what they look like in operation when installed in the Ikea Clock: Purchase options: Bare board Bare board with LEDs and Ikea clock Populated board Populated board with Ikea clock Would anyone be interested in buying one of them?
  5. I have done both of these tasks for more than one client. The 1-Wire protocol speed ends up being about 15kHz, which is slow but reliable. It's really cool to see on an scope though. I developed the I2C slave code using the sample TI code as the starting point. Here are the research materials that I referred to while writing my I2C code: http://www.nxp.com/documents/application_note/AN10216.pdf http://www.nxp.com/documents/user_manual/UM10204.pdf http://i2c.info/i2c-bus-specification http://www.ti.com/lit/an/slva704/slva704.pdf My slave code just follows the logic of the transaction.
  6. Hi EveryBody! I came across three software libraries on github that I thought I would share: pytelemetry telemetry pytelemetrycli pytelemetry provides high-level communication with any embedded device for remote control and monitoring. Specifically, pytelemetry implements a custom communication protocol, based on the PubSub (Publish/Subscribe) messaging pattern. telemetry is the C implementation of the protocol. It can run on any embedded system, along with official distributions for Arduino and ARM Mbed. pytelemetrycli is a powerful command line interface to interact with embedded devices using the protocol. It enables instant data visualization of any received data, full logging of communications, health monitoring of the serial port and much more. It looks like the libraries have been developed for the mbed and the arduino so far. I've got these on my "to play with" bucket list. YMMV
  7. @@bluehash Is this MAVLink?
  8. @@LIJsselstein, I don't have any specific reason for singling out this repository. A long time ago, in another job, I was writing C code for the Z80. The micro had to talk with the on-board metering system of a gigantic mining truck. The protocol used was called PLM2. It has since upgraded to PLM3. It turns out that it is too complex of a protocol for my tinkering. So, I went on the hunt for source code examples which demonstrated packetized communication between the PC and a micro. Specifically, I was hunting for source code examples in python that showed me how to work with structures of packets. Eventually, I would like to have a PC program that creates a SCADA like interface to my micro projects. I want to issue commands to the micro and receive back lots of data. It seemed to me that this pytelemetry was a convenient example to consider. Do you have other source code examples that you would like to share with us? I was on the hunt for source code examples which demonstrated packetized communication between the PC and a micro.
  9. I found this DSO138 oscilloscope kit on HobbyKing today. It may be of use to some people out there who do have a limited test equipment budget. From what I can tell, it looks like you have to solder in all of the through hole parts to complete the build. And I think the processor comes pre-programmed. I don't own one of these. I just thought it was a cool and inexpensive tool for only $20.
  10. @@AndyD273, Welcome! Dust off that board and get 'er running!
  11. Hi!

    Welcome @@KeithB! Please feel free to start a thread on your specific questions over in the General forum and tell us all about your thoughts and intentions.
  12. Oh, please tell us more about your circuit. Are you using a LaunchPad? Which hardware version is it? Do you about the jumpers that effect the I/O lines?
  13. Okay, I am interested in this section: #ifndef __LCD_H #define __LCD_H #define DATAREG P1OUT |= BIT4 // P2OUT |= BIT4 #define COMMANDREG P1OUT &= (~BIT4) // P2OUT |= BIT4 #define READ P1OUT |= BIT5 // P2OUT |= BIT5 #define WRITE P1OUT &= (~BIT5) // P2OUT &= (~BIT5) #define ENABLE_HIGH P1OUT |= BIT6 // P1OUT |= BIT6 #define ENABLE_LOW P1OUT &= (~BIT6) // P1OUT &= (~BIT6) These three lines look suspicious to me. #define COMMANDREG P1OUT &= (~BIT4) // P2OUT |= BIT4 #define ENABLE_HIGH P1OUT |= BIT6 // P1OUT |= BIT6 #define ENABLE_LOW P1OUT &= (~BIT6) // P1OUT &= (~BIT6) Specifically, I am looking at your commented out code which I understand is what you want to do. Should they be adapted to Port2 somehow? #define COMMANDREG P1OUT &= (~BIT4) // P2OUT |= BIT4 ^^^^ #define ENABLE_HIGH P1OUT |= BIT6 // P1OUT |= BIT6 ^^^^^ #define ENABLE_LOW P1OUT &= (~BIT6) // P1OUT &= (~BIT6) ^^^^^ I put carets underneath the characters that I think are suspicious. What do you think?
  14. I stumbled across a list of nine open source books on Hacker News today that will help people learn how to program in C. YMMV
  15. Welcome @@dutyfree! There is a lot of small details that could go wrong when you change from Port1 to Port2. Could you do use a favor and post your code so we can see what you are doing? Please use the little blue <> symbol when you are posting your code in your reply message. That will make the code look nice for us to see.
  16. I just stumbled upon a program called SKiDL. Never use a lousy schematic editor again! SKiDL is a simple module that lets you describe electronic circuits using Python. The resulting Python program outputs a netlist that a PCB layout tool uses to create a finished circuit board. The author then uses KiCAD to massage the netlist information to complete the PCB layout. I can't say that I will be using this myself but I admit that it's a novel new way of creating circuits. YMMV.
  17. @@lalo630 Interesting tracks you've got there. How is the rolling resistance on them? Do you think the spacing on the white pads are close enough? Keep us updated on your progress. I would love to see a video of it in motion!
  18. @@yyrkoon, Check out the linki @@timotet posted. The way I describe this LED is that it's an addressable RGB LED that uses a one way protocol SPI-like protocol. Each LED emitter inside the unit consumes up to 20mA of current for a grand total of about 60ma when the color White is commanded. The refresh speed appears to be quite quick - faster than the common WS2812 RGB LED anyways. I believe I have the SPI configured for an unrealisticly high speed of 8MHz and the LEDs are working, mostly. In my test code, the last LED's Red element glows slightly. I beleive if I were to slow down the SPI port then that artifact would go away. My motivation for making these rings was to push myself forward to learn new skills with Altium, MSP430s and to make a clock that my kids would enjoy having in their rooms. My motivation for offering these units for sale is to gauge the interest of you all in this technology. Not many people seem interested therefore I can conclude that this design is a dud i.e.: It's just a clock. I am considering a completely different kid friendly design using these LEDs where I will use a standard sized picture frame and install a single board matrix of APA102Cs that can display pretty much anything your creative mind can come up with. I'm still doing a feasability study on that design. Feel free to ask questions.
  19. @@yyrkoon I am thinking of all kinds of things but the first is this... Congratulations! You did it! You Delivered! Clients love it when you DELIVER! Good Job!!! I am also thinking how you have begun to develop a process for doing various tasks. Things like this: - How do I capture the client's requirements? - How do I program a chip? - How do I invoice the client? - and so on ... Once you have figured out one of those processes then I recommend writing it down immediately. Then you will remember how to do it next time. Also, you will be able to teach your employee how to do the same thing in the future. I'm also thinking about liability. That is, this hush hush product is now out in the wild being used. Will it fail? When will it fail? How will it fail? Will someone get injured or die if it fails? If any of that happens then who will bear the liability for that unintended and unexpected event? For me, I have an insurance policy that covers me for "Errors and Omissions". That's the policy type. And then I am always hunting for the next job or task. Who could or should I talk to to get more work? I'm sure there are many other things that I could think about but it's important to celebrate the present successes first. <fistbump> Good Job! This is awesome. Let's do some more of this!
  20. I stumbled across a really cool resource from Ford Motor Company tonight. It's called EMC Online and it's located here: http://www.fordemc.com Here's a copy-paste of their introduction: ====================== Forward The quality and reliability of today's automobiles are dependent in part on its electrical system to operate as designed within the vehicle
  21. I tried to install CSS 7 Beta on my mac and got this message - repeatedly: ;-(
  22. What about FreeRTOS? What about MicroPython?
  23. @@yyrkoon, @@Fred As far as i can tell, it's the CSA/UL safety ratings that makes these products expensive.
  24. @@yyrkoon For your consideration: Motion Sensors from Grainger. Light Sensors from Grainger. I'm certain that there are many other options out there. This is where I would start my research.
  25. @@yyrkoon Joe and his brother built the company from the ground up. Their software was written in house. Their product is top notch. They are good people. EEVBlog has done a teardown. And another one here. If the Saleae isn't your cup of tea then maybe you might like the Open bench Logic Sniffer instead?