hi everyone... what i want to do is that whenever i press a number from my computer, it will be displayed from the 7 segment display.. i have my own customized development board. Can anybody tell me what is wrong with my code?
something seems to be wrong with this code since the upper right part of the seven segment will not light.. so like when i press the number 1, only the lower half is shown.. i am using PIC MCU C compiler and a 16f877 microprocessor.. please help..
Looking at you data, you have active low outputs and the DP on RB3. If this is the case then you either have a wiring fault or your display/pic is/are damaged.
or change LED_MAP[1] to any number from 0 to 9, it will display the correct number but if i revert to my previous code it wont display the upper right segment of the display.. please help..
In that case your getchar routine must be returning an invalid value. I assume kbhit checks for any key pressed and getchar returns the pressed key. Can you post these routines?
yes.. the keyboard is in my PC and I send data serially to the pic.. i have an PCW compiler IDe where i write my code and a PIC downloader to send it to the PIC.. I use a PIC MCU C Compiler.. and in the reference manual of this compiler it has a kbhit() function to return true if a character is received from any hardware like the keyboard.
is there another way to do this? if you have any suggestions please help..
i just want to display in the 7 segment the number that i press from the keyboard.. please help..
hi.. i would love to test your code but could you be so kind to explain a few things for me? what is PIR1? is that a port? how about RCIF AND RXREG? please help... thanks in advance..
PIR1 is the Peripheral Interrupt Register and RCIF is bit 5 of that register. RCIF gets set whenever a byte is received via RS232. The received byte is in RCREG (whoops ,typo earlier) which is another register. For more info see section 10.2.2 of the data sheet.