• AVR Freaks

Helpful ReplyHot!Help for complete novice

Author
ullisees123
New Member
  • Total Posts : 2
  • Reward points : 0
  • Joined: 2018/12/12 10:34:13
  • Location: 0
  • Status: offline
2020/08/10 12:41:33 (permalink)
1 (1)

Help for complete novice

Hi all

I have a urgent problem where i need some code for a PIC16F54 that once the pic is powered up it writes to address 00 of a 93LC46B and does nothing else.

Thank you
#1
W4GNS.
Senior Member
  • Total Posts : 40
  • Reward points : 0
  • Joined: 2009/11/16 18:23:19
  • Location: Dixie
  • Status: offline
Re: Help for complete novice 2020/08/11 11:57:45 (permalink)
+5 (5)
ullisees123
Hi all
I have a urgent problem where i need some code for a PIC16F54



Sounds like you better get busy to writing code!
#2
XorLor
Junior Member
  • Total Posts : 72
  • Reward points : 0
  • Joined: 2009/10/23 00:17:05
  • Location: 0
  • Status: online
Re: Help for complete novice 2020/08/11 13:29:50 (permalink)
+1 (1)
What exactly do you need help with? The schematic, MPLAB project setup, or just the code?
 
I would start out by reading the 93LC46B datasheet so you can learn what is required to communicate with it. Then read the PIC16F54 datasheet.
#3
Bob White
Super Member
  • Total Posts : 336
  • Reward points : 0
  • Joined: 2010/11/06 19:52:38
  • Location: Denver, Colorado
  • Status: offline
Re: Help for complete novice 2020/08/11 13:50:18 (permalink)
+3 (3)
ullisees123
Hi all

I have a urgent problem where i need some code for a PIC16F54 that once the pic is powered up it writes to address 00 of a 93LC46B and does nothing else.

Thank you



This sounds like a homework problem/school assignment.  Coming here and asking for someone to give you the answer is intellectually lazy and dishonest.
 
If you want help, show and explain all of your work and tell us what you do not understand.
#4
jtemples
عُضْوٌ جَدِيد
  • Total Posts : 11982
  • Reward points : 0
  • Joined: 2004/02/13 12:31:19
  • Location: Southern California
  • Status: offline
Re: Help for complete novice 2020/08/11 13:55:55 (permalink) ☄ Helpfulby Jim Nickerson 2020/08/11 13:56:41
+4 (4)
it writes to address 00 of a 93LC46B and does nothing else.

 
How will you demonstrate to your professor that it works?
#5
dan1138
Super Member
  • Total Posts : 3843
  • Reward points : 0
  • Joined: 2007/02/21 23:04:16
  • Location: 0
  • Status: offline
Re: Help for complete novice 2020/08/11 15:07:06 (permalink)
+1 (1)
jtemples
it writes to address 00 of a 93LC46B and does nothing else.

How will you demonstrate to your professor that it works?

If it's homework then it's got to be a Proteas simulation.
 
Give 'em a break, the kid needs help from a 15 year old application note:
AN993 - Interfacing Microwire Serial EEPROMs to PIC16 Devices
AN993 pdf
AN993 code
 
And these application notes from 27 years ago:
AN536 pdf
AN530 pdf

Also the EEPROM data sheets can help:
93LC46B data sheet
93LC66A data sheet
post edited by dan1138 - 2020/08/13 10:06:15
#6
ullisees123
New Member
  • Total Posts : 2
  • Reward points : 0
  • Joined: 2018/12/12 10:34:13
  • Location: 0
  • Status: offline
Re: Help for complete novice 2020/08/11 22:57:33 (permalink)
0
The problem is just the code. The pic16f54 and 93lc46b are already linked and in a circuit. I have mplab 8.92 and have been using idc2 to program the pic. The original code i have is not asm it is just hex so can't add to that code.

I need to add a line of code to the eeprom. I have tried isp but with the 93lc46b being a SOT23-6 it's a bit difficult to solder wires to it.

My thought was to write code that i can put into the pic first that will write to the eeprom then reprogram the pic with the required hex code.

I have never wrote asm code from scratch and have a basic knowledge of c for arm and avr.

So any guidance on how to write the code would be grateful
#7
dan1138
Super Member
  • Total Posts : 3843
  • Reward points : 0
  • Joined: 2007/02/21 23:04:16
  • Location: 0
  • Status: offline
Re: Help for complete novice 2020/08/11 23:17:10 (permalink)
+1 (1)
From what you have posted nobody could write code to do what you have asked for.
 
You will need to describe what you want someone to do for you (for free) with a lot more detail and show some skills in reading the application notes I have pointed out.
#8
PStechPaul
Super Member
  • Total Posts : 2919
  • Reward points : 0
  • Joined: 2006/06/27 16:11:32
  • Location: Cockeysville, MD, USA
  • Status: offline
Re: Help for complete novice 2020/08/12 11:48:09 (permalink)
0
So you can connect your ICD2 to the PIC, and read the flash memory? Look at the disassembly listing and add the code to that, then use it to program the PIC. I'm not sure why you want to have the PIC write code to the EEPROM and then use it to program the PIC. Is it a bootloader with code in the EEPROM?
 
If you have the hex code in a file, you can load it into the IDE and likewise use the disassembly listing. It may require some work to use the disassembly to be accepted by the assembler to create new code for the PIC.

 
#9
dan1138
Super Member
  • Total Posts : 3843
  • Reward points : 0
  • Joined: 2007/02/21 23:04:16
  • Location: 0
  • Status: offline
Re: Help for complete novice 2020/08/12 21:06:23 (permalink)
+4 (4)
PStechPaul
So you can connect your ICD2 to the PIC, and read the flash memory? Look at the disassembly listing and add the code to that, then use it to program the PIC. I'm not sure why you want to have the PIC write code to the EEPROM and then use it to program the PIC. Is it a bootloader with code in the EEPROM?
 
If you have the hex code in a file, you can load it into the IDE and likewise use the disassembly listing. It may require some work to use the disassembly to be accepted by the assembler to create new code for the PIC.



Paul,
 
I do not see this poster having enough experience to be able to understand any of what you have said.
 
I have looked into what it takes to get a baseline PIC like the 16F54 to bit-bang an SPI like interface for a 93LCxx class EEPROM. It is a bit tricky and the application notes will confuse a novice.
 
The Original Poster(OP) does not seem to be able to offer a coherent description of what needs to be done. Instead the OP wants a solution that fits withing their small realm of comprehension.
 
I have worked out an application that can do what the OP asked for in post #1, but before I post the source code I would like the OP to take another try at a more complete description of what they want and what they may actually need.
post edited by dan1138 - 2020/08/13 10:01:41
#10
Jump to:
© 2020 APG vNext Commercial Version 4.5