Discussion in "Project Help" started by    ronotsig    May 27, 2019.
Mon May 27 2019, 03:06 AM
#1
I am trying to using P89LPC921 or P89LPC922 in a project. I cannot get the KBI function to work. It appears that I an unable to write KBPATN, KBMask, and KBCon. They only have default values. If I load the same small test program in the P89LPC925 it works flawlessly.
Does anyone with experience with the P89LPC92x processors successfully used the KBI function?
Mon May 27 2019, 06:23 PM
#2
I can't see any reason that those registers would be "Read only".
Are you sure you are using the correct header files ?

Which compiler are you using ?

Please zip and post your test code.


[ Edited Tue May 28 2019, 12:16 AM ]
Wed May 29 2019, 03:13 PM
#3
Since the code works for the P89LPC925, it is apparent that the registers are write/read. However it appears that the registers cannot be written in the 920/921.
Thank you for your response.

I have enclosed a schematic and my code. This is the circuitry for a speed sensor. A change of the port pin (hall effect sensor input) triggers an ISR to capture the time between pulses and compute rpm. The complete program works fine with a P89LPC925 but does not work in the P89LPC920 or P89LPC921. I would like to use the latter and you have 15000+ pieces in stock, but I have to get it to work. I only have one of the 920 and a few of the 921.

The date code of the 920 is “Yn6607B”.
The date code of the 921’s is “Yn6624B”

I do not have an emulator. The program is in assembly. (I have coded extensively in assembly for 40+ years.) I reduced the program functionality to an absolute minimum. No ISR for the Port0 pin. At its simplest it does the following:
- Read in ID.
- Write B0 of ID to NLEDRX.
- Write ID to KBPATN or KBMASK.
- Read KBPATN or KBMASK into ACC.
- Write B0 of ACC to NLEDTX.

The code runs fine on the 925 but not on the 920 or 921. The values read back from KBPATN and KBMASK are the initial values from RESET.

Do you know anyone who has? Do you have a contact who was an FAE with NXP or something.

I am in dire straights. I tested the program using the 925 part. Then for production run of 3000 units, I substituted the 921 part. Then I found out that the KBI function is not working in the 921 part (and also it does not work in the 920 part).

NXP does not care since they have discontinued the part. It is very frustrating. There must still be very knowledgeable people who would know of this problem and/or how it can be worked around. After all, how can you have a functionality in the datasheet and user manual that does not work. And especially since the 925 part is built on the same core with just additional peripherals.

Thanking you in advance.

Wed May 29 2019, 09:05 PM
#4
I would suggest a fresh approach.

The Keil compiler supports the P89LPC921,
so I would write a new mini test program in 'c'.

The Keil compiler is free for code under 2k.





[ Edited Thu May 30 2019, 04:20 AM ]
Thu May 30 2019, 08:32 PM
#5
It occurs to me that although the P89LPC921 and P89LPC925
are very similar, they are not the same.
Perhaps a careful look at the differences will give you the answer.

Get Social

Information

Powered by e107 Forum System

Conversation

Tue May 28 2019, 07:14 PM
Ron Otsig
KBI does not work on P89LPC920 but it works on P89LPC925
Mon May 27 2019, 09:03 AM
BIJI MATHEW
Hello friends....
DragonDad
Tue May 21 2019, 03:02 PM
Hi. Who is online?
Tue May 14 2019, 12:38 AM
Jayson Contreras
Hello
Xkalebar
Sun Apr 28 2019, 09:06 AM
Please provide me the code for gsm based sms controlled notice board
ExperimenterUK
Sun Apr 14 2019, 10:52 PM
@hassan malik post your problem in the "General help Guidance and Discussion" forum
Sun Apr 14 2019, 05:06 PM
RAJESH MAPARi
please send me code to interface atmega32 with 24c1024 serial eeprom
Sun Apr 14 2019, 01:33 PM
hassan malik
hello sir i installed proteus 7.8 professional on window 7 ultimate and window 10 but there would be same errors onn both windows. the error is bad license key.please any one help me
Sun Apr 14 2019, 01:32 PM
hassan malik
hello sir i installed proteus 7.8 professional on window 7 ultimate and window 10 but there would be same errors onn both windows. the error is bad license key.
ExperimenterUK
Sat Apr 06 2019, 05:59 PM
@deshrar. Please post your question in 8051 forum

Downloads

Comments

Easwaran22
Thu Jun 13 2019, 10:16 AM
JenniferJJ
Thu Jun 13 2019, 05:12 AM
seyoonnet
Tue Jun 04 2019, 12:37 PM
Charbel
Sun Jun 02 2019, 03:30 PM
ronotsig
Mon May 27 2019, 03:00 AM
WilsonNig
Sun May 26 2019, 03:11 AM
DragonDad
Tue May 21 2019, 02:50 PM
dhiyamtech
Thu May 09 2019, 10:20 AM

Online

Guests: 28, Members: 0 ...

most ever online: 182184
(Members: , Guests: 182184) on 06 Aug 2010: 05:37 AM

Members: 38072
Newest member: Easwaran22
Forum Activity
JenniferJJ Avatar
Posted By JenniferJJ
Thu Jun 13 2019, 05:17 AM
Hi,Hello Members,I am the newbie member, I like ve...
ExperimenterUK Avatar
Posted By ExperimenterUK
Thu May 30 2019, 08:32 PM
It occurs to me that although the P89LPC921 and P8...
ExperimenterUK Avatar
Posted By ExperimenterUK
Wed May 29 2019, 09:05 PM
I would suggest a fresh approach.The Keil compile...
ronotsig Avatar
Posted By ronotsig
Wed May 29 2019, 03:13 PM
Since the code works for the P89LPC925, it is appa...
ExperimenterUK Avatar
Posted By ExperimenterUK
Mon May 27 2019, 06:23 PM
I can't see any reason that those registers would ...
ronotsig Avatar
Posted By ronotsig
Mon May 27 2019, 03:06 AM
I am trying to using P89LPC921 or P89LPC922 in a p...
Ansh12 Avatar
Posted By Ansh12
Sun Apr 28 2019, 02:15 PM
I made a minor change, it works in Proteus.Try the...
ExperimenterUK Avatar
Posted By ExperimenterUK
Thu Apr 25 2019, 08:20 PM
I made a minor change, it works in Proteus.Try the...
gigyani Avatar
Posted By gigyani
Thu Apr 25 2019, 01:17 AM
when i add cufirst.hex its not working.after 2-3 s...
ExperimenterUK Avatar
Posted By ExperimenterUK
Wed Apr 24 2019, 12:29 AM
http://www.8051projects.net/download-d205-electron...