Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 10:40 25 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Help with PIC16C54/ 16C57 please.

Author Message
YT2095

Newbie

Joined: 07/02/2012
Location: United Kingdom
Posts: 22
Posted: 02:35pm 09 Feb 2012
Copy link to clipboard 
Print this post

Does anyone here have any experience with the PIC 16c54 or 16c57 chips at all?
I have a complete set with programmer, manuals, s/ware, and ICs.
I`v read all the manuals that came with it a few times and I`m still left with the problem of How to write a program for them?
the s/ware is running on a Win98 machine so the Parallel port will work 9all s/ware was on floppy too), I can program the HEX files that came with the s/ware as a demo using PICALC, and all works just great.

the problem is How do i even try and write my own source code so the ASM compiler can do its thing?

there`s no IDE per se, there is a Simulator (PICSIM), but that`s just what it says on the box, so I`m Really Stuck here :(

all I want to do, is read in 4 bit Binary data on TRIS A, and convert that to the equiv HEX 7 Segment LED display on TRIS B.
not exactly a "Rocket Science" program, and yet I can`t even get started as there`s no clear indication of Where one would start?

Anyone?


 
Olimex
Senior Member

Joined: 02/10/2011
Location: Bulgaria
Posts: 226
Posted: 04:24pm 09 Feb 2012
Copy link to clipboard 
Print this post

oh my these were the first PICs from Microchip which I used loooong time ago
C series are OTP (one-time-programmable) so make sure you know what you do before program them

no C, no debugger, just assembler and simulator

if your code increase and move to the second bank of memory you set and clear page banks before and after every memory access instruction, crazy!

...and I have seen Chinese DMX controller with 12 potentiomaters and many LEDs and buttons multiplexed and implemented with single PIC16C57 I didn't want to believe my eyes when I saw it, the author should have spent months to implement it.

so generaly these are PITA, just throw them in the garbage can

I would recommend you to switch to something more decent like $0.60 PIC16F1503 at least it's Flash and you can work with debugger

 
YT2095

Newbie

Joined: 07/02/2012
Location: United Kingdom
Posts: 22
Posted: 04:32pm 09 Feb 2012
Copy link to clipboard 
Print this post

I have these in JW too, so I can prototype, and erase under UV without a problem.
also I have over 150 of these brand new ICs, I`m not trowing them away.

in effect the code I want is simply a lookup table, input X gives me 7 segment output Y.
this can be done with a simple EPROM alone, so a PIC chip should be quite capable of this too.

anyone else?
 
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1425
Posted: 05:22pm 09 Feb 2012
Copy link to clipboard 
Print this post

I don't have example code for you to try, but a book like "Programming and Customizing PICmicro Microcontrollers" by Myke Predko might be great help for you. That type of book has a lot of assembly examples for simple input/output.


Micromites and Maximites! - Beginning Maximite
 
jman

Guru

Joined: 12/06/2011
Location: New Zealand
Posts: 711
Posted: 06:23pm 09 Feb 2012
Copy link to clipboard 
Print this post

Hi

Try this http://www.melabs.com/
This will allow you to use basic
I have used the previous version with great success
I did this with it

http://www.youtube.com/watch?v=QE1TibaLj3o


Jman
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3800
Posted: 07:58pm 09 Feb 2012
Copy link to clipboard 
Print this post

You can just write the ASM in any text editor (even notepad), then use the Microchip tool(s) to assemble it and turn it into a HEX (or BIN) file. There are plenty of programmers to put the HEX (or BIN) into the device.

The instruction set is truly awful IMO but if you like a challenge...

John
 
elproducts

Senior Member

Joined: 19/06/2011
Location: United States
Posts: 282
Posted: 12:44pm 10 Feb 2012
Copy link to clipboard 
Print this post

  jman said   Hi

Try this http://www.melabs.com/
This will allow you to use basic
I have used the previous version with great success
I did this with it

http://www.youtube.com/watch?v=QE1TibaLj3o


Jman


Can you share the code?
I'd like to see how you did that rolling affect on the numbers.
That looks great.
www.elproducts.com
 
YT2095

Newbie

Joined: 07/02/2012
Location: United Kingdom
Posts: 22
Posted: 01:08pm 10 Feb 2012
Copy link to clipboard 
Print this post

well it`s certainly a comfort to know I don`t need anything additional to get one of these little beasties to work, Notepad I can do :)

and yes, you`re quite right about the instruction set (of 33 mnemonics), give me Z80 Machine Code anyday!
the whole topography reminds me of a Half-Built CPU with added RAM to make up for it :)

I`m sure it can`t be That hard to code though, if a simple EPROM can do the job as a state machine.

I think I will have a look at this MELABs stuff, perhaps writing in BASIC may be a little easier (as long as I don`t have to jump through too many hoops to get to that point).

unless of course anyone here already HAS some code that will take 4 bit binary input and turn it into a 7 segment LED HEX display?
 
jman

Guru

Joined: 12/06/2011
Location: New Zealand
Posts: 711
Posted: 07:56pm 10 Feb 2012
Copy link to clipboard 
Print this post



Jman
  Quote  

Can you share the code?
I'd like to see how you did that rolling affect on the numbers.
That looks great.



Sure it was done in PicBasicPro
Not very pretty to look at but it works


John2012-02-11_055648_wib-scroll.zip Edited by jman 2012-02-12
 
aargee
Senior Member

Joined: 21/08/2008
Location: Australia
Posts: 255
Posted: 11:15pm 10 Feb 2012
Copy link to clipboard 
Print this post

Looks like something Art did here...

Rolling LCD effect

I used Picaxe code to run my WIB LCD.

- Rob



For crying out loud, all I wanted to do was flash this blasted LED.
 
jman

Guru

Joined: 12/06/2011
Location: New Zealand
Posts: 711
Posted: 11:17pm 10 Feb 2012
Copy link to clipboard 
Print this post

Yip
thats were i got the idea from :)


John
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024