Comments for www.botdream.com http://www.botdream.com/blog Building a remote controlled robot from an old pc! Thu, 12 Nov 2009 16:40:52 +0000 http://wordpress.org/?v=2.3.3 Comment on Testing Pic code for I2C Master/Slave communication by Sebastien http://www.botdream.com/blog/2008/02/01/testing-pic-code-for-i2c-masterslave-communication-2/#comment-81 Sebastien Fri, 28 Aug 2009 07:55:27 +0000 http://www.botdream.com/blog/2008/02/01/testing-pic-code-for-i2c-masterslave-communication-2/#comment-81 Well as you noticed, Master mode is only available through software operations, but parts of the hardware should help in building it. In fact, the code you use should (in theory) works perfectly using the same PIN, configured in I2C mode. The main difference should be that some of the operations are of no use (for example : enforcing the state of pins is not required, as in I2C mode only the TRIS needs to be changed). Despite this...I am currently trying to obtain a result using this approach, but can't succeed in it. Surely I am missing something. I will probably have a try with a much powerfull device that has hardware support of Master Mode, in order to make my 16F690 SLAVE CODE running well, and then try to do the master with another 16F690. But my final goal for my current project is not to use 16F690 as the Master...will keep you informed of any new results. Well as you noticed, Master mode is only available through software operations, but parts of the hardware should help in building it. In fact, the code you use should (in theory) works perfectly using the same PIN, configured in I2C mode. The main difference should be that some of the operations are of no use (for example : enforcing the state of pins is not required, as in I2C mode only the TRIS needs to be changed).
Despite this…I am currently trying to obtain a result using this approach, but can’t succeed in it. Surely I am missing something. I will probably have a try with a much powerfull device that has hardware support of Master Mode, in order to make my 16F690 SLAVE CODE running well, and then try to do the master with another 16F690. But my final goal for my current project is not to use 16F690 as the Master…will keep you informed of any new results.

]]>
Comment on Testing Pic code for I2C Master/Slave communication by Nelson Neves http://www.botdream.com/blog/2008/02/01/testing-pic-code-for-i2c-masterslave-communication-2/#comment-80 Nelson Neves Fri, 28 Aug 2009 00:01:48 +0000 http://www.botdream.com/blog/2008/02/01/testing-pic-code-for-i2c-masterslave-communication-2/#comment-80 Hi Sebastian, It's been a while since my tests, I may probably wrongly assumed that PIC 16F690 would only support I2C Slave mode by hardware (and not Master mode) and so used the master emulated by software (using the CCSInfo internal libraries) and that is the main reason why the Pins don't match! RC2 and RC3 from Master are being used for I2C master emulation. Reviewing the datasheet I have now noticed that PIC 16F690 also supports I2C Master mode by software: http://ww1.microchip.com/downloads/en/DeviceDoc/41262E.pdf (page 197: 13.13 Master Mode). My apologies for this wrongly assumption! Thank you for making this important notice! I'm a bit busy testing some other projects based on Linux Embedded devices and will not have the available time to test this as it should, if you are interested in sharing your tests please feel free to post a link for your work! Once again, thank you for your comment, Regards. Hi Sebastian,

It’s been a while since my tests, I may probably wrongly assumed that PIC 16F690 would only support I2C Slave mode by hardware (and not Master mode) and so used the master emulated by software (using the CCSInfo internal libraries) and that is the main reason why the Pins don’t match! RC2 and RC3 from Master are being used for I2C master emulation.

Reviewing the datasheet I have now noticed that PIC 16F690 also supports I2C Master mode by software:
http://ww1.microchip.com/downloads/en/DeviceDoc/41262E.pdf
(page 197: 13.13 Master Mode).

My apologies for this wrongly assumption! Thank you for making this important notice!

I’m a bit busy testing some other projects based on Linux Embedded devices and will not have the available time to test this as it should, if you are interested in sharing your tests please feel free to post a link for your work!

Once again, thank you for your comment,

Regards.

]]>
Comment on Testing Pic code for I2C Master/Slave communication by Sebastien http://www.botdream.com/blog/2008/02/01/testing-pic-code-for-i2c-masterslave-communication-2/#comment-79 Sebastien Thu, 27 Aug 2009 14:06:54 +0000 http://www.botdream.com/blog/2008/02/01/testing-pic-code-for-i2c-masterslave-communication-2/#comment-79 Congratulation for your posts and sharing your knowledge. I am currently working on a similar project (two 16F690 talking to each other through I2C). I have one question about why you make use of 2 "PORT C" lines to drive the I2C bus. I thought that both chips should be connected through SDA and SCL on PORT B4/6, and the master should switch the TRISB state to drive the bus. Am I wrong about that ? Congratulation for your posts and sharing your knowledge. I am currently working on a similar project (two 16F690 talking to each other through I2C). I have one question about why you make use of 2 “PORT C” lines to drive the I2C bus. I thought that both chips should be connected through SDA and SCL on PORT B4/6, and the master should switch the TRISB state to drive the bus. Am I wrong about that ?

]]>
Comment on Testing Pic code for I2C Master/Slave communication by Nelson Neves http://www.botdream.com/blog/2008/02/01/testing-pic-code-for-i2c-masterslave-communication-2/#comment-77 Nelson Neves Fri, 15 May 2009 16:52:23 +0000 http://www.botdream.com/blog/2008/02/01/testing-pic-code-for-i2c-masterslave-communication-2/#comment-77 Glad to ear that you made it out! Sorry for the lack of feedback from me, but as I told you I'm a bit busy doing some Linux Embedded hardware testing for bifferboard! Thanks for sharing your project idea, It is actually very complete! Unfortunately I haven't advanced in my USB studies and I'm afraid that I can't help you to decide If the PIC 18F4550 will meat your needs. Have you read this article: http://www.circuitcellar.com/usb/ (Open the PDF) You can also check for Microchip USB Framework, will probably get extra info: http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2680&dDocName=en537044 Some Microchp interesting USB Appnotes: http://ww1.microchip.com/downloads/en/AppNotes/01247a.pdf?from=rss http://ww1.microchip.com/downloads/en/AppNotes/01143a.pdf?from=rss Regards. Glad to ear that you made it out! Sorry for the lack of feedback from me, but as I told you I’m a bit busy doing some Linux Embedded hardware testing for bifferboard! Thanks for sharing your project idea, It is actually very complete!

Unfortunately I haven’t advanced in my USB studies and I’m afraid that I can’t help you to decide If the PIC 18F4550 will meat your needs. Have you read this article:
http://www.circuitcellar.com/usb/ (Open the PDF)

You can also check for Microchip USB Framework, will probably get extra info:
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2680&dDocName=en537044

Some Microchp interesting USB Appnotes:
http://ww1.microchip.com/downloads/en/AppNotes/01247a.pdf?from=rss
http://ww1.microchip.com/downloads/en/AppNotes/01143a.pdf?from=rss

Regards.

]]>
Comment on Testing Pic code for I2C Master/Slave communication by Chelsea C http://www.botdream.com/blog/2008/02/01/testing-pic-code-for-i2c-masterslave-communication-2/#comment-76 Chelsea C Fri, 15 May 2009 15:50:00 +0000 http://www.botdream.com/blog/2008/02/01/testing-pic-code-for-i2c-masterslave-communication-2/#comment-76 I completed the project I asked you about in my last post. We ended up using electronic dice made with LEDs controlled by a PIC16F690 micro. We used serial to communicate with another pic, I2C to store dice values, SPI to start a motor if either of the die values was a 6 and A/D to start the entire system (using a photocell in a voltage divider circuit). Perhaps that can give other students ideas for PIC projects. I am back to my EOG mouse project. I need to understand detail on USB specifications. I'm doing a lot of research but a direct explaination would be nice. Is there anything you can tell me about why a PIC18F4550 is good for USB compatability spec-wise? I know you said you didn't get much into USB interfacing with this. So far, I have the fact that the PIC is capable of operating at a full speed rate of 12mbits/s which is supported by all USB hubs and it supports 16 bidirectional endpoints (which I don't know if this is important to mention?). I know you're busy but small advice on what is important to know and understand would be helpful. THanks I completed the project I asked you about in my last post. We ended up using electronic dice made with LEDs controlled by a PIC16F690 micro. We used serial to communicate with another pic, I2C to store dice values, SPI to start a motor if either of the die values was a 6 and A/D to start the entire system (using a photocell in a voltage divider circuit). Perhaps that can give other students ideas for PIC projects.

I am back to my EOG mouse project. I need to understand detail on USB specifications. I’m doing a lot of research but a direct explaination would be nice. Is there anything you can tell me about why a PIC18F4550 is good for USB compatability spec-wise? I know you said you didn’t get much into USB interfacing with this.

So far, I have the fact that the PIC is capable of operating at a full speed rate of 12mbits/s which is supported by all USB hubs and it supports 16 bidirectional endpoints (which I don’t know if this is important to mention?).

I know you’re busy but small advice on what is important to know and understand would be helpful.

THanks

]]>
Comment on Testing Pic code for I2C Master/Slave communication by Nelson Neves http://www.botdream.com/blog/2008/02/01/testing-pic-code-for-i2c-masterslave-communication-2/#comment-75 Nelson Neves Fri, 15 May 2009 09:17:05 +0000 http://www.botdream.com/blog/2008/02/01/testing-pic-code-for-i2c-masterslave-communication-2/#comment-75 Thanks for your visit, I'm glad for the feedback ;) Thanks for your visit, I’m glad for the feedback ;)

]]>
Comment on Testing Pic code for I2C Master/Slave communication by Ivon http://www.botdream.com/blog/2008/02/01/testing-pic-code-for-i2c-masterslave-communication-2/#comment-74 Ivon Thu, 14 May 2009 15:44:57 +0000 http://www.botdream.com/blog/2008/02/01/testing-pic-code-for-i2c-masterslave-communication-2/#comment-74 Thx at last a practical and easy example using I2C, Nice blog i'll keep visiting it, again thx for share :) Thx at last a practical and easy example using I2C, Nice blog i’ll keep visiting it, again thx for share :)

]]>
Comment on Testing Pic code for I2C Master/Slave communication by Chelsea C http://www.botdream.com/blog/2008/02/01/testing-pic-code-for-i2c-masterslave-communication-2/#comment-73 Chelsea C Wed, 15 Apr 2009 19:51:07 +0000 http://www.botdream.com/blog/2008/02/01/testing-pic-code-for-i2c-masterslave-communication-2/#comment-73 In my first post, I mentioned a project I have to do for a class using I2C Master Slave communication within the next few weeks. I am about to embark on that project, although I have to choose a project to do given requirements that it has to fit. I have spent a lot of time on the internet, searching for projects ideas. I am not sure what project would be good because I don't have a very good knowlege of the protocol we have to use for this project yet. I was hoping you could help steer me and my potential group in the right direction. Thank you very much for your time and help. Main resources: two gear motors 24FC256 I2C memory chip two PIC16F690 chips and PICKIT2 programmer kit photocell (resistance changes when light is on the photocell so our professor said we could use this property in a voltage divider to change voltage) digital potentiometer EEprom I think we are supposed to use: potentiometer EEprom Requirements and grading scale for Project 3 This project is worth 40 points (40%). It is possible to get more than 40 points. The grading will be based on a base score that is multiplied by various factors. The base system is worth 15 points. Base system should consist of two processors that communicate with each other and with shared responsibility to achieve one or more tasks. You should be able to start the system using a remote control (TV remote with IR receiver or a flash light with a photo cell, tuned audio receiver and a dog whistle). Please pick up some photocells from me when you have the chance. Feature Multiplier Serial communication more complex than a simple start/stop 1.1 Two way serial communication 1.1 I2C communication 1.1 SPI Communication 1.1 SPI Communication - Bit Banged 1.2 Analog input with A/D conversion 1.1 Two way communication using I/O pins 1.1 • Additional Multipliers I reserve two more multipliers, one a factor of 1.2 for any well thought out feature(s) or doing something not directly covered in the class (for example using hardware PWM, or designing a mixed analog/digital component), and another a factor of 1.33 for what I call as a WOW factor. It is possible for a group to have a common base system and different students in the group may have additional features that they want to implement. Your report should document it by having a common report with separate appendices where each group member may want to add additional items. In my first post, I mentioned a project I have to do for a class using I2C Master Slave communication within the next few weeks. I am about to embark on that project, although I have to choose a project to do given requirements that it has to fit. I have spent a lot of time on the internet, searching for projects ideas. I am not sure what project would be good because I don’t have a very good knowlege of the protocol we have to use for this project yet.

I was hoping you could help steer me and my potential group in the right direction. Thank you very much for your time and help.

Main resources:
two gear motors
24FC256 I2C memory chip
two PIC16F690 chips and PICKIT2 programmer kit
photocell (resistance changes when light is on the photocell so our professor said we could use this property in a voltage divider to change voltage)
digital potentiometer
EEprom

I think we are supposed to use:
potentiometer
EEprom

Requirements and grading scale for Project 3

This project is worth 40 points (40%). It is possible to get more than 40 points. The grading will be based on a base score that is multiplied by various factors.

The base system is worth 15 points. Base system should consist of two processors that communicate with each other and with shared responsibility to achieve one or more tasks. You should be able to start the system
using a remote control (TV remote with IR receiver or a flash light with a photo cell, tuned audio receiver and a dog whistle). Please pick up some photocells from me when you have the chance.
Feature Multiplier
Serial communication more complex than a simple start/stop 1.1
Two way serial communication 1.1
I2C communication 1.1
SPI Communication 1.1
SPI Communication - Bit Banged 1.2
Analog input with A/D conversion 1.1
Two way communication using I/O pins 1.1

Additional Multipliers

I reserve two more multipliers, one a factor of 1.2 for any well thought out feature(s) or doing something not directly covered in the class (for example using hardware PWM, or designing a mixed analog/digital
component), and another a factor of 1.33 for what I call as a WOW factor.

It is possible for a group to have a common base system and different students in the group may have additional features that they want to implement. Your report should document it by having a common report with separate appendices where each group member may want to add additional items.

]]>
Comment on Testing Pic code for I2C Master/Slave communication by Nelson Neves http://www.botdream.com/blog/2008/02/01/testing-pic-code-for-i2c-masterslave-communication-2/#comment-72 Nelson Neves Tue, 14 Apr 2009 09:30:25 +0000 http://www.botdream.com/blog/2008/02/01/testing-pic-code-for-i2c-masterslave-communication-2/#comment-72 Sorry, completely forgot about that one! Damn! That was referenced to me by a colleague and He is quite happy with it! It seems to be very similar to CCSInfo, you will get a good discount if you also buy a demoboard! I've been tempted to buy a kit from them, demoboard and C compiler but was waiting on a business proposal for that and had no luck! If you are going for a payed solution I think this one has a really good price/quality. http://www.mikroe.com/ Sorry, completely forgot about that one! Damn!

That was referenced to me by a colleague and He is quite happy with it! It seems to be very similar to CCSInfo, you will get a good discount if you also buy a demoboard! I’ve been tempted to buy a kit from them, demoboard and C compiler but was waiting on a business proposal for that and had no luck!

If you are going for a payed solution I think this one has a really good price/quality.

http://www.mikroe.com/

]]>
Comment on Testing Pic code for I2C Master/Slave communication by Chelsea C http://www.botdream.com/blog/2008/02/01/testing-pic-code-for-i2c-masterslave-communication-2/#comment-71 Chelsea C Tue, 14 Apr 2009 03:00:44 +0000 http://www.botdream.com/blog/2008/02/01/testing-pic-code-for-i2c-masterslave-communication-2/#comment-71 Have you tried out Mikroelectronica's MiKroC compiler? It was what I was thinking of using but I am open to suggestions. (I'm currently looking into the ones you suggested) Have you tried out Mikroelectronica’s MiKroC compiler? It was what I was thinking of using but I am open to suggestions. (I’m currently looking into the ones you suggested)

]]>