![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| PIC Programing / Design Discuss programing of PIC chips here and design of electronics using PIC chips. |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
| Hi all, I am having trouble with PORT-A on the 16F873A. I have SET all pins (INPUTS) and configured all to Digital I/O (ADCON1 0X06h) but the ports do not detect a logic HIGH condition applied to the pins. I am using a K8048 to do the programming. Also, for some reason port RB7 has 1.7volts when it should be outputting Logic LOW. I have also disabled the alternate usage of this port as well... Any Ideas? |
|
#2
| ||||
| ||||
| I guess it goes without saying, you used the right page when using the TRISA TRISB? Al.
__________________ “Logic will get you from A to B. Imagination will take you everywhere.” Albert E. (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management) |
|
#3
| |||
| |||
Yes... TRIS instructions are correct...The code is actually quite complex for a project I am working on. I have the Virtual Breadboard software (you can download it at www.virtualbreadboard.com) It is a great way to Wring out the bugs in your PIC code. Anyway... The code works ok in simulation but the real chip is giving me the trouble... I'm wondering if the K8048 progammer is the culprit. Anyone else having this problem, or am I the only lucky one.... |
|
#4
| |||
| |||
| I would suggest testing the PIC by programming it to do something obvious in a temporary breadboarded circuit, like blinking LEDs on it's ports, if you get that to work, change program and the temporary breadboarded circuit to read one port, and send the data from the input port to another port (with leds attached) this should allow you to test the pics i/o. If you get that far then the pic and the programmer are working. I would start to look at my pic code. If you have trouble with the i/o in the temporary circuit, maybe check the status of the internal weak pull-up resistors. If these are available on the 16f873a it is possible they could be effecting your application. If you would like to eliminate the programmer as the cause, you could make a very simple ICSP (in circuit serial programming) connection on a breadboard, then program the pic via these pins. Assuming 16f873a supports ICSP. I think you can send the program from the serial port of the PC using icprog software or another freeware. I don't have circuit, or specific details, but I believe it's just a five wire interface. Its my understanding the pic doesn't even need an oscillator attached to be programmed using ICSP. |
|
#5
| |||
| |||
| Thanx for responding, I of course did all of that before I posted here... but for all you PIC16F87X users out there, I had to change my code so that it clears the adcon1 and the TrisA registers first, and then reset them to my required settings. This seemed to resolve the issue. Thanx... |
| Sponsored Links |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Pic programming? velleman k8048 | j m | PIC Programing / Design | 62 | 04-12-2009 02:56 AM |