Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
Careful what you ask for you just might get it.
;
; Data space use by binary to BCD convertion
PSECT BCD_Data,global,class=RAM,space=1,delta=1,noexec
;
GLOBAL BCD_Result
BCD_Result: DS 2
;
PSECT MainCode,global,class=CODE,delta=2
;
Bin2BCD:
movwf BCD_Result
clrf...
A few years ago Dave Jones on the EEVBLOG posted a number of videos about using the very low cost controllers from Padauk.
Here are links to his videos:
EEVblog #1132 - The 3 Cent Microcontroller
EEVblog #1140 - 3 CENT Micro LED Blinky with ICE!
EEVblog #1141 - Padauk 3 CENT Micro - Programmer...
@joniengr
The MPLABX tools (MCC and simulator) are kind of broken in the PIC18F25K80 for the ADC and special event trigger so they do not simulate correctly.
I have attached a project make with MPLABX v6.00 and XC8 v2.36 that will simulate and act like the special event trigger for the ADC...
This is a sample project that does a lot of what you are asking for https://github.com/dsoze1138/18F2520_LCD_4x4keypad
If you want a custom crafted application for your specific hardware using the PIC18F4520 you need to post all of your classwork assignment in detail.
What you have not shown...
@ginettine,
The code you posted does not show how you have initialized the configuration words or the ADC control register ADCON0 of the PIC16F876A controller.
I do not have the MikroC compiler installed but here is as generic an example as I can create with the Microchip XC8 compiler.
/*
*...
The Microchip PICkit3 is enumerated as a Human-Interface-Device(HID) in the USB hierarchy.
The MPLABX IDE scans the USB hierarchy to detect all supported device programmers for the controller target specified by the project when the developer starts a debug session or device programming.
You...
For the common, that is simple, analog to digital converters in use today the values reported are a ratio from zero to the maximum integer count the converter is designed to provide. For this topic that is 16-bits, so a maximum of 65535.
To represent this ADC value in terms of voltage applied...
As Brian has suggested the CLJA and CLJB are likely MPASM MACROs.
An assembly language MACRO is one method to create a single line directive that expands to multiple lines of assembly language opcodes.
Based only on the information in post#1 this is one possible way to implement a CLJB macro...
It's hard to know for sure but the Original Poster(OP) seems to be looking from someone to do the design work for a school project.
The components the OP has selected:
PIC16F887
GASBOARD-7500H
1602 LCD character module
or 4-digit 7-segment LED module.
If this is a school project the OP...
It is lucky that you are using a Proteus simulation because the way you have connected the LCD character module is almost impossible to get working with real hardware. There are several other issues in your source code that will cause problems too.
In any case this is one way to read ADC...
As you have not provided any information about how your circuit is connected this is an implementation based on the Microchip PICDEM2+ (DM163022-1):
list n=0, c=250 ; No page breaks, support long lines in list file
list r=dec ; Set default radix to decimal...
Please post a complete description of exactly how the HD44780 based LCD character module is connected to the PIC16F877A.
From the code you posted the 7-segment LED is a common cathode type connected to PORTB like this:
RB7 - segment A
RB6 - segment B
RB5 - segment C
RB4 - segment D
RB3 -...
@mayasunny,
It seems to me that this homework assignment is beyond what you have so far been taught.
Here is a complete, builds with MPLAB v5.50 and XC8 v2.32, demo application:
/*
* File: main.c
* Author: dan1138
* Compiler: XC8 V2.32
* IDE: MPLABX v5.50
*
* Created on July 26, 2021...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.