I am not much of a programmer, sometimes I have to make some changes and if it succeeds it's not knowledge but trial and error. Lots of trial and errors. For example, I get message ' unknown type name 'bit' ', than I change the line
bit status=0; to
int status=0; and when I am lucky it Build Succeeds, which it did. By the way, this builds too:
__bit status=0; That is probably better to do. (in lcd.c)
I found something that might be of interest for readers who want to do the Circuit Digest Pic-examples, in real or simulated. There are about 53 of them:
https://circuitdigest.com/pic-microcontroller-projectsand I noticed they wrote their own Lcd.h and Lcd.c files. You can also find them if you type lcd.h in search.
Problem is, going from example 1 untill the end these files change somewhat. Among example 1 to 53 sometimes there are zip-files to download a complete project, the mentioned files are included in that and if you compare them you will see what I mean.
At the moment I am doing example 34 Keypad until example 53, the last one.
https://circuitdigest.com/microcontroller-projects/4x4-keypad-interfacing-with-pic16f877aThe article contains a zip, the link is just above the code.
What I noticed is that since this keypad example, all the next examples that make use of the HD44780, the second line never appears anymore on the screen. Searching and trying I found that this address needs to be changed:
#define LineTwo 0xC0into
#define LineTwo 0xA8That line is in lcd.c and in main.c there is a simular line(s) to be changed.
I would like to ask a question if it does not take too much time to answer.
Why is it that this address needs to be changed? Is it in the simulator, do they use another LCD at Circuit Digest or is it something else? Thanks in advance.
Keypad is working now
- Code:
:100000000A128A11F82F00308A000408840A820735
:10001000003432346E34643420344C3469346E34F9
:100020006534203441346434643472346534733458
:0400300073340034F1
:10097400831203138601F0308316031386007F303D
:10098400F0007008810508008316031388010A1219
:100994008A11C3250A128A110A128A11BA240A1268
:1009A4008A110800F800013083120313A0000030FC
:1009B400A100081478080A128A1171250A128A11F2
:1009C40008006E30F3007308F400F02C0A128A1148
:1009D40054260A128A11F3007308F4006E30740668
:1009E4000319F52CF62CE82C74080800F400831283
:1009F4000313081088107408880008152C30F000C0
:100A04000130F1000A128A110D250A128A1183128B
:100A1400031308110800F201F301F201F301182D88
:100A24000130F2070318F30A0030F3077108730268
:100A3400031D1E2D70087202031C212D222D122D60
:100A44000800FB00F901FA013A2D79087B078400BC
:100A54000A128A1103200A128A110A128A11D42452
:100A64000A128A110130F9070318FA0A0030FA074A
:100A740079087B0784000A128A1103200A128A115A
:100A8400003A031D462D472D272D08000A128A110E
:100A9400C6240A128A1180300A128A1171250A1298
:100AA4008A1101300A128A1123250A128A11A830E8
:100AB4000A128A1171250A128A110A128A11E32470
:100AC4000A128A11FC007C08FD007D080A128A11B2
:100AD400D4240A128A115F2D0A128A110028F60002
:100AE40083120313200821040319792D7A2D7D2DF7
:100AF400A001A1017E2D081088107608F400740866
:100B0400F700F030F4007408F7050F30F4007408AF
:100B140088057708F4007408880408152C30F00060
:100B24000130F1000A128A110D250A128A1183126A
:100B3400031308117608F40003300310F40DFF3E8C
:100B4400031D9F2D0310740DF5007508F700F03098
:100B5400F4007408F7050F30F4007408880577086A
:100B6400F4007408880408152C30F0000130F100FA
:100B74000A128A110D250A128A118312031308110D
:100B840008002C30F0000130F1000A128A110D2502
:100B94000A128A1130300A128A11F8240A128A11B0
:100BA4002C30F0000130F1000A128A110D250A12CE
:100BB4008A1130300A128A11F8240A128A112C3050
:100BC400F0000130F1000A128A110D250A128A116F
:100BD40030300A128A11F8240A128A112C30F000DB
:100BE4000130F1000A128A110D250A128A112030EF
:0C0BF4000A128A11F8240A128A112C300F
:100C0000F0000130F1000A128A110D250A128A1132
:100C10000C300A128A1171250A128A112C30F00048
:100C20000130F1000A128A110D250A128A110430CE
:100C30000A128A1171250A128A112C30F000013033
:100C4000F1000A128A110D250A128A1185300A1242
:100C50008A1171250A128A112C30F0000130F1003E
:100C60000A128A110D250A128A1106300A128A11F7
:100C700071250A128A112C30F0000130F1000A129D
:100C80008A110D250A128A1101300A128A11712562
:100C90000A128A112C30F0000130F1000A128A1178
:100CA0000D250A128A1108008312031306108614F8
:100CB00006158615061A5D2E5E2E732E1A30F2006A
:100CC0005E30F1006E30F000F00B642EF10B642EFC
:100CD000F20B642E000083120313061E702E712E79
:100CE0006B2E3130F72F861A762E772E8C2E1A30F7
:100CF000F2005E30F1006E30F000F00B7D2EF10B53
:100D00007D2EF20B7D2E000083120313861E892E8A
:100D10008A2E842E3230F72F061B8F2E902EA52E72
:100D20001A30F2005E30F1006E30F000F00B962EBB
:100D3000F10B962EF20B962E000083120313061F62
:100D4000A22EA32E9D2E3330F72F861BA82EA92E60
:100D5000BE2E1A30F2005E30F1006E30F000F00B63
:100D6000AF2EF10BAF2EF20BAF2E00008312031348
:100D7000861FBB2EBC2EB62E4130F72F06148610D0
:100D800006158615061AC52EC62EDB2E1A30F20061
:100D90005E30F1006E30F000F00BCC2EF10BCC2E5B
:100DA000F20BCC2E000083120313061ED82ED92E70
:100DB000D32E3430F72F861ADE2EDF2EF42E1A3083
:100DC000F2005E30F1006E30F000F00BE52EF10B1A
:100DD000E52EF20BE52E000083120313861EF12E82
:100DE000F22EEC2E3530F72F061BF72EF82E0D2F96
:100DF0001A30F2005E30F1006E30F000F00BFE2E83
:100E0000F10BFE2EF20BFE2E000083120313061FC1
:100E10000A2F0B2F052F3630F72F861B102F112F7F
:100E2000262F1A30F2005E30F1006E30F000F00B29
:100E3000172FF10B172FF20B172F0000831203133C
:100E4000861F232F242F1E2F4230F72F06148614BF
:100E500006118615061A2D2F2E2F432F1A30F20059
:100E60005E30F1006E30F000F00B342FF10B342FB8
:100E7000F20B342F000083120313061E402F412F64
:100E80003B2F3730F72F861A462F472F5C2F1A300B
:100E9000F2005E30F1006E30F000F00B4D2FF10BE0
:100EA0004D2FF20B4D2F000083120313861E592F76
:100EB0005A2F542F3830F72F061B5F2F602F752FB6
:100EC0001A30F2005E30F1006E30F000F00B662F49
:100ED000F10B662FF20B662F000083120313061F1F
:100EE000722F732F6D2F3930F72F861B782F792FA4
:100EF0008E2F1A30F2005E30F1006E30F000F00BF1
:100F00007F2FF10B7F2FF20B7F2F00008312031333
:100F1000861F8B2F8C2F862F4330F72F06148614B5
:100F200006158611061A952F962FAB2F1A30F20050
:100F30005E30F1006E30F000F00B9C2FF10B9C2F17
:100F4000F20B9C2F000083120313061EA82FA92F5B
:100F5000A32F2A30F72F861AAE2FAF2FC42F1A30A7
:100F6000F2005E30F1006E30F000F00BB52FF10BA7
:100F7000B52FF20BB52F000083120313861EC12F6D
:100F8000C22FBC2F3030F72F061BC72FC82FDD2FE5
:100F90001A30F2005E30F1006E30F000F00BCE2F10
:100FA000F10BCE2FF20BCE2F000083120313061F7E
:100FB000DA2FDB2FD52F2330F72F861BE02FE12FE1
:100FC000F62F1A30F2005E30F1006E30F000F00BB8
:100FD000E72FF10BE72FF20BE72F0000831203132B
:100FE000861FF32FF42FEE2F4430F72F6E300800BA
:100FF00083120313A001A10183010A128A11482D53
:02400E007A3FF7
:00000001FF
++++++++++++++++++++
**************************
I solved my own challenge from the previous post, sort of.
I used a shift register to get an irregular input signal at around 125 kHz, the frequency where this RFID is supposed to operate with, but with only a generator as input signal it works as well. Since the LCD's second line is working more examples can be simulated.