Continue to Site

Welcome to EDAboard.com

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.

no switching from bank 1 to bank 0

Status
Not open for further replies.

newbie111

Member level 2
Joined
Nov 29, 2009
Messages
51
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Location
h.k
Activity points
1,609
[#include <p16F690.inc>
__config (_INTRC_OSC_NOCLKOUT & _WDT_OFF & _PWRTE_OFF & _MCLRE_OFF & _CP_OFF & _BOR_OFF & _IESO_OFF & _FCMEN_OFF)


myPortC equ 0x07

org 0x000

start movlw 0x00
tris myPortC
movlw b'1111'
movwf myPortC
circle goto circle
end]

I tried the code and it worked


my q is how come we do not need to go from bank 1 to bank 0 for setting?

Thanks[/code]
 

Hi,


Afraid you have missed the point about these registers.

The TRIS instruction sets the direction of the Port , Input or Output.
The PORT instruction moves the data To or From the i/o pins

The other thing that confuses a lot of beginners, its that when first powered on, the default settings are that many of the i/o pins are set to Analogue mode so you must first turn the ones you want to Digital by means of the ADCON1 instruction.

Download the Pickit2 Starter Kit Lessons at the bottom of this page. It is a beginners practical programming tutorial for the 16F690 from Microchip, it demostarates these points and should help get you going.

**broken link removed**
 

    newbie111

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top