PIC Assembler Observation

Thread Starter

PICNewbee

Joined Mar 31, 2017
355
Thank you TQFP

Sorry TQ not a big picture taker.

Took 18F off the dev board because it will be a long time before I work my way up to 18F's.

Just more craftsman like to keep board ready to use. Empty.
 

TQFP44

Joined Sep 3, 2016
51
Sorry TQ not a big picture taker.
There seems to be a problem then , taking a picture and posting it here is relatively simple compared to all the processes involved with coding a program to run some simple hardware... you have managed 333 post and to be honest not a lot of it makes a lot of sense ?

Just more craftsman like to keep board ready to use. Empty.
Still working on getting programming to be consistent.
I suspect you are just wasting everybody's valuable time here and here

http://www.microchip.com/forums/m1009900.aspx#1013795


"The most brilliant concept in the world is only a dream unless you take action" ?
 
Last edited:

Papabravo

Joined Feb 24, 2006
21,228
There seems to be a problem then , taking a picture and posting it here is relatively simple compared to all the processes involved with coding a program to run some simple hardware... you have managed 333 post and to be honest not a lot of it makes a lot of sense ?





I suspect you are just wasting everybody's valuable time here and here

http://www.microchip.com/forums/m1009900.aspx#1013795


"The most brilliant concept in the world is only a dream unless you take action" ?
I have to agree, since I don't often get the gist of the formulaic responses in the double spaced format beginning with "thank you masked mans"

 

OBW0549

Joined Mar 2, 2015
3,566
... you have managed 333 post and to be honest not a lot of it makes a lot of sense ?
I don't think "making sense" is a top priority for this fellow. "Seeking attention," on the other hand, is; otherwise, he would not be treating us to these stream-of-consciousness updates on his "progress."
 

Thread Starter

PICNewbee

Joined Mar 31, 2017
355
Okay.

This post is about Gooligum tutorials being a source of information.

The tutorial covers the PICs it deals with and their features.

I like the part about starting with the 10F200 and using other PICs 'stair step' fashion.

Going to back up to beginning and take things one thing at a time.

It's the only game in town.

At least for me.
 
Last edited:
PICNewBee has been posting in the Microchip forum since December and has 428 posts, mostly nonsense and description of "progress": that appears to be like memorizing a phone book before you make your first call. He seems to have built exactly zero projects and he is seeking the most difficult and arcane methods of programming and debugging. I think he is bored and lonely and enjoys chatting with program developers and engineers. He has posted pictures in the MC forum but I think only of a project board with a PIC and a few jumper wires, but not even a circuit that flashes an LED. He is also fixated on getting and using an "old school" programmer like the PICstart that uses a serial interface. Continue the conversation if you wish, but I do so only as a form of entertainment, which is probably the OP's intention as well.
 

Thread Starter

PICNewbee

Joined Mar 31, 2017
355
Thank you Paul

If it's okay with you I'll keep learning PIC programming.

Actually if it is not okay with you I'll keep learning it anyhow.

See you back at good old Microchip forum.
 

be80be

Joined Jul 5, 2008
2,072
Well I'm not going to put anyone down but the Gooligum tutorials there not god on how to program a picmicrochip the baseline chips are a pain in the butt sometime and a way better chip could be used way better. Mplab -X works great with the pickit3 just need to power the chip because the limited output.
It's way easier to learn to program by putting a chip on a board and seeing what happens I spent about 2 years with asm I like basic but I'm starting to like c way better.
Bob learn MPLAB- X and it's sim you don't even need a chip and you can see where the 10111111 10000110 01010101 are going and doing.
 

Thread Starter

PICNewbee

Joined Mar 31, 2017
355
Burt

How about the code lines to write a value to 10F200 data memory?

Data Memory for 10F00 looks like it is addresses 10 to 1F in datasheet.

Goal is to write a 'literal value'. Can be 1111 1111 because it is writing to data memory.

That won't screw anything up like writing to SFRs.
 

be80be

Joined Jul 5, 2008
2,072
You write to data
the compiler tells you if you messing up.
The high performance of the PIC10F200/202/204/206
devices can be attributed to a number of architectural
features commonly found in RISC microprocessors. To
begin with, the PIC10F200/202/204/206 devices use a
Harvard architecture in which program and data are
accessed on separate buses. This improves band-
width over traditional von Neumann architectures
where program and data are fetched on the same bus.
Separating program and data memory further allows
instructions to be sized differently than the 8-bit wide
data word. Instruction opcodes are 12 bits wide,
making it possible to have all single-word instructions.
A 12-bit wide program memory access bus fetches a
12-bit instruction in a single cycle. A two-stage pipeline
overlaps fetch and execution of instructions.
Consequently, all instructions (33) execute in a single
cycle (1 s @ 4 MHz) except for program branches.
The table below lists program memory (Flash) and data
memory (RAM) for the PIC10F200/202/204/206
devices.

The PIC10F200/202/204/206 devices can directly or
indirectly address its register files and data memory. All
Special Function Registers (SFR), including the PC,
are mapped in the data memory. The PIC10F200/202/
204/206 devices have a highly orthogonal
(symmetrical) instruction set that makes it possible to
carry out any operation, on any register, using any
addressing mode. This symmetrical nature and lack of
“special optimal situations” make programming with the
PIC10F200/202/204/206 devices simple, yet efficient.
In addition, the learning curve is reduced significantly.

The PIC10F200/202/204/206 devices contain an 8-bit
ALU and working register. The ALU is a general
purpose arithmetic unit. It performs arithmetic and
Boolean functions between data in the working register
and any register file.
The ALU is 8 bits wide and capable of addition, subtrac-
tion, shift and logical operations. Unless otherwise
mentioned, arithmetic operations are two’s comple-
ment in nature. In two-operand instructions, one oper-
and is typically the W (working) register. The other
operand is either a file register or an immediate con-
stant. In single operand instructions, the operand is
either the W register or a file register.
The W register is an 8-bit working register used for ALU
operations. It is not an addressable register.
Depending on the instruction executed, the ALU may
affect the values of the Carry (C), Digit Carry (DC) and
Zero (Z) bits in the STATUS register. The C and DC bits
operate as a borrow and digit borrow out bit, respec-
tively, in subtraction. See the SUBWF and ADDWF
instructions for examples.
A simplified block diagram is shown in Figure 3-1 and
Figure 3-2, with the corresponding device pins
described in Table 3-2.
 

Thread Starter

PICNewbee

Joined Mar 31, 2017
355
Burt

Separating program and data memory further allows
instructions to be sized differently than the 8-bit wide
data word. Instruction opcodes are 12 bits wide,
making it possible to have all single-word instructions.

'8-bit wide data word.'

That clears up one thing.

Okay. Let me find the correct MOV to use.
 

be80be

Joined Jul 5, 2008
2,072
It's like it reads just short hand Look at it.
movwf Move W to f
movlw Move literal to W
f Register file address so that's where you would want it to go ................
w Working register (accumulator) got put it down in writing so you can send it to f
so you write to w and move w to f
 

be80be

Joined Jul 5, 2008
2,072
movlw Move literal to W yes
Why you hung up on nonsense if you read the data sheet you'd see that yes there reg with 12 bits got have a way of knowing that there are carry bits and stuff like that when you get into math and bit shifting.
You got to no things like hey the timer rolls over so bit 9 get's set to say hey your counter just hit 256 dang how would I no if I was only 8 bit's wide I wouldint but I was smarter then that I do my math and if it's bigger I shift the carry bits 8 bit's one bit at a time till the 9th bit doesn't carry over.
 
Last edited:

Thread Starter

PICNewbee

Joined Mar 31, 2017
355
Drilling down in Data sheet.

Data memory/two functional groups-Special Function registers and General Purpose Registers/General Purpose Registers

Register File Map 00 to 1F address

00 to 07 SFR

08 to 0F Unimplemented

That leaves me 10 to 1F or 16 to 31 in counting numbers or 16 net locations

Let's do MOV and see where address number plugs in.
 

Thread Starter

PICNewbee

Joined Mar 31, 2017
355
'MOVWF f' is the syntax

Hex addresses in datasheet have a lower case h after the number.

Compiler wants to see a '0x' in FRONT of number.

Have to use hex number of 10 to IF

Keep it simple. MOVWF 0x10

Is that it?
 
Top