Access Bank in PIC18 || How access bank is formed up in PIC18 Microcontroller

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 ก.ย. 2024

ความคิดเห็น • 12

  • @harshkoshti4588
    @harshkoshti4588 ปีที่แล้ว +3

    you are amazing bro

    • @LearnOnline1
      @LearnOnline1  6 หลายเดือนก่อน

      You are welcome!!

  • @wynand988
    @wynand988 2 ปีที่แล้ว +1

    where do you show the bank switching in other lectures?

    • @LearnOnline1
      @LearnOnline1  2 ปีที่แล้ว

      I am sorry, I was busy and could not reply in time. I hope it is not too late.
      I dont remember exactly, but I explained it in the PIC18F instruction playlist th-cam.com/video/Hp7eAomGU-g/w-d-xo.html
      . However, for your convenience, let me put it here MOVWF 00H, D, A here D is the destination bit, and A is the bank number. For example, for access bank, it will be simply 0, and for bank 1, it would be 1, and so on. Depending upon the size of RAM, it can be up to F.

    • @wynand988
      @wynand988 2 ปีที่แล้ว +1

      @@LearnOnline1 hello, thank you very much for the reply, i somewhat figured that out but this still helps i thought it was just either 1 or 0 as the datasheets are not very clean.
      I hop its not too much trouble but i need some help, I have experience using a pic16, all worked correctly but now moving over to pic18 I simply cant get it to work properly and cant seem to find a good explanation for initializing the code.
      I am using mplabx and pic-as compiler, my code compiles and debugs correctly but does not reflect in a working microcontroller.
      thanks for your time and good videos!

    • @LearnOnline1
      @LearnOnline1  2 ปีที่แล้ว

      @@wynand988 few questions before I answer. Have you burned the code ( hex) file in Proteus? Because you say microcontroller isn't working..how you identify it that it's not working..mplabx is okay. But you should try the simpler one mplab ide. Have you studied about configuration registers?

    • @wynand988
      @wynand988 2 ปีที่แล้ว

      @@LearnOnline1 haven't delved into Proteus yet, it is Mplab x IDE not sure if thats the same as youre saying snd i use the IPE to burn the code to the controllers. I do know about the config bits my controller does for example respond to those its not like jts broken. I think the issue is something to do with the code inturrputing or something. I use the psect resetvedt,global,reloc=2,class=code,delta=1 and add that to the linker files.

    • @wynand988
      @wynand988 2 ปีที่แล้ว

      @@LearnOnline1 so I've made some progress, I've added the htc.h file to the header files and sorted out the liker tags and psect flags, been reading on microchips webpage about this and I'm happy that thats all in order . But still i can only get the chip effect one port, can make an LED blink with a loop so the code execution works partially. It skips everything else it seems even the osccon bits so i cant change the speed. Im thinking its an issue with the bank access but this doesn't make sense to me since everything i use is in the access bank so just adding 0 should work and it complies and debugs correctly, so what gives. I see in microchips exampled they sometimes use the movlb instruction for SFRs for some reason but that doesnt change anything for me