What Type of Code is This for PIC Microcontrollers?

  • Thread starter Thread starter ws0619
  • Start date Start date
  • Tags Tags
    Code Source Type
AI Thread Summary
The source code in question is written for a PIC microcontroller, specifically the PIC16F648A. It utilizes assembly language, which is evident from its syntax and structure, including commands like `movlw`, `movwf`, and `bsf`. The code initializes certain registers and sets up the microcontroller's I/O configuration. The user is seeking assistance in understanding this assembly code and is interested in converting it to C#. Recommendations for conversion tools or methods are requested, along with references to PIC instruction set documentation for further learning.
ws0619
Messages
53
Reaction score
0
Hi!
May I know what type of this source code it is?It looks like assembly code, but I'm not sure.



LIST p=16f648a
include "P16f648a.inc"
__config h'3f18'


PC equ h'02'



cblock h'20'

endc



org h'0000'



movlw h'07'
movwf CMCON


bsf STATUS, RP0
movlw b'00000000'
movwf TRISB
movlw b'00100000'
movwf TRISA
bcf STATUS, RP0



setup


begin
goto begin


end

I just copy the structure of the program.This program is written for PIC.
I am a newbie for PIC programming, can someone tell me what code is this?And I want to convert this code to C#,any suggestion for the converter?

thanks!
 
Technology news on Phys.org
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I have a quick questions. I am going through a book on C programming on my own. Afterwards, I plan to go through something call data structures and algorithms on my own also in C. I also need to learn C++, Matlab and for personal interest Haskell. For the two topic of data structures and algorithms, I understand there are standard ones across all programming languages. After learning it through C, what would be the biggest issue when trying to implement the same data...
Back
Top