Hi,
I am working on a small project, for which i have created chip code, which i have tested and it works fine in Keil IDE. But the same when uploaded to chip behaves partly expected or totally unexpected. Some times the chip doesn't reset even done hardware reset.
I have checked it with 3 chips, but no success. My programmer seems fine as it is detecting attached chip and programming chip correctly.
In my project I need serial communication, which is also not working fine. Sometime the MCU skips sending or receiving characters, or doesn't respond to command event after hardware resets.
Could you please suggest me how to resolve this?
Let me know if any further information is required.
Details AT89S52, USB Programmer, C Programming language,
Regards,
Bhagirath
www.botskool.com/.../ioi85.jpg is just your schematic or "circuit diagram" - it does not show how you have physically constructed your real board.
As already noted, the physical construction does matter!
"my knowledge is limited in electronics, thats why I am having some issues in understanding electronics"
And also, most likely, why you're having issues getting the electronics to work!
How much study & research have you done into electronics in general, and the 8051 in particular?
There are plenty of books, websites, and hobby magazines about electronics. There are plenty of books & websites that cover using 8051s; eg, see: http://www.keil.com/books/8051books.asp
See also: www.8052.com/.../175610
Alternatively, have you considered buying a ready-made board?
Even if your aim is evntually to make your own board, it would be good to have a "known-good" board for reference.
"I have created a project to control stepper motors"
Before moving on to a project like that, have you done the basic stuff like blinking an LED, sending "Hello, World" to the serial port, receiving data from the serial port, etc,...?
"from my laptop via serial communication"
Your schematic doesn't show how you intend to connect to the laptop.
"I think previously it was working fine"
As a software developer, you should know to take frequent copies of your work - so that you can always go back to the last working version...
"please suggest me the proper way to attach the reset IC with my existing board"
Have you looked at the link provided earlier? Have you studied the Datasheets for the devices mentioned there? Have you looked for examples, application notes, etc provided by the manufacturers of those devices? Have you googled for examples of using those chips?
Note that none of this has anything specifically to do with Keil.
"As a software developer, you should know to take frequent copies of your work - so that you can always go back to the last working version..."
And there are lots of free source code versioning tools available. There are CVS, Subversion, Git, ...
Hi Andrew,
"As already noted, the physical construction does matter!" I would have posted actual image of my board, but I am out of city for 2 days so, as soon as I am there I will post the image of it.
"How much study & research have you done into electronics in general, and the 8051 in particular?" Although my electronics knowledge is limited but I have basic knowledge to make my things work.
"There are plenty of books,..." I have referred those articles related to 8051 in assembly as well as in c(I prefer c). Mainly I refer "8051 microcontroller and embedded system by Mazidi".
"Alternatively, have you considered buying a ready-made board?" I prefer making it myself, the present one I am using is made by me(copy of one ready made special purpose board), If this doesn't resolve, I will buy one.
"Before moving on to a project like that, have you done the basic stuff like blinking an LED, sending "Hello, World" to the serial port, receiving data from the serial port, etc,...?"
Yes off-course, I have done that, and prior to stepper motor I have successfully control 2 dc geared motors via my laptop.
"Your schematic doesn't show how you intend to connect to the laptop."
I do have USB-Serial cable (pl2303), via which I send signals. I have tested the cable it is working fine.
I have all the versions with me, although the current version for stepper motor is the same, but added a method to control steps.
"Have you looked at the link provided earlier? Have you studied the Datasheets for the devices mentioned there? Have you looked for examples, application notes, etc provided by the manufacturers of those devices? Have you googled for examples of using those chips?
Note that none of this has anything specifically to do with Keil."
Yes, I have gone though the link, from where I found MAX810 befitting my board. For me Datasheets provide too technical information to understand but still I try to get as much as i can. Yes its seems that my code is working fine, but some thing is wrong with board.
Thanks
"I have basic knowledge to make my things work"
But your 'thing' does not work!
It's impossible to give advice appropriate to your level of experience when we don't know what that level is!
"its seems that my code is working fine, but some thing is wrong with board"
I think it's too early to jump to that conclusion!
There certainly seem to be issues with your board - you need to fix them first before moving on to any potential issues in your code...
You mean this: www.prolific.com.tw/.../products.asp ?
But that is just a chip - not a cable!
I mean kind of commtest.com/.../11642.jpg.
Its a dongle with built in pl2303 chip for usb to serial communication.
Please take care not to put any punctuation at the end of a URL - the forum will think it's part of the link so, therefore, the link will not work.
Neither of the links you have posted so far worked - because of this!
www.botskool.com/.../ioi85.jpg, broken by trailing comma; commtest.com/.../11642.jpg. - broken by trailing full stop.
Always test the links from the preview before posting!
Note that this commtest.com/.../11642.jpg converts USB to RS232 - you must not connect RS232 direct to microcontroller pins!
RS232 uses (relatively) high voltage signals - nominally swinging between +12V and -12V
For connecting direct to a microcontroller, it would be far better to use one of these: www.ftdichip.com/.../USBTTLSerial.htm - taking care to select a 5V or 3V version, as appropriate.