| View previous topic :: View next topic |
| Author |
Message |
temtronic
Joined: 01 Jul 2010 Posts: 9658 Location: Greensville,Ontario
|
|
Posted: Tue Mar 06, 2012 9:00 am |
|
|
Always figured a 'cross-pre-compiler' would be nice, to convert that 'foreign' code into 'classic' CCS C code.
Wonder if there's a vaiable market for it? |
|
 |
dz
Joined: 03 Mar 2012 Posts: 4
|
|
Posted: Tue Mar 06, 2012 7:41 pm |
|
|
I'm sorry for that inconvenient.. so sorry..
Actually i used hitec c compiler and Mplab because it can download free from internet and the schematic i send to you with jpeg format through ccs email...
If it hard for you to help me.. i'm so sorry...
ok mike thanks a lot for try to help me..
thanks mike.. |
|
 |
bkamen
Joined: 07 Jan 2004 Posts: 1619 Location: Central Illinois, USA
|
|
Posted: Wed Mar 07, 2012 1:22 am |
|
|
| temtronic wrote: | Always figured a 'cross-pre-compiler' would be nice, to convert that 'foreign' code into 'classic' CCS C code.
Wonder if there's a vaiable market for it? |
CCS has had in the works for a while now a compatibility mode of sorts..
when it will be done -- who knows? _________________ Dazed and confused? I don't think so. Just "plain lost" will do. :D |
|
 |
Mike Walne
Joined: 19 Feb 2004 Posts: 1785 Location: Boston Spa UK
|
|
Posted: Wed Mar 07, 2012 2:54 am |
|
|
You still have not said if you intend to use CCS compiler.
I have not had the jpeg schematic via CCS. Since you've lifted it from a competitor, I doubt they will.
I showed you a way to post schematics. It does not have to be complete, just enough to show us exactly how the relevant parts are connected. Rows of dots for repeated sections where it's obvious. No need to show ALL connections for busses.
Then we need a SHORT program which demonstrates the problem you are having. Provide a CONCISE description of how you think it works, or what it should be doing and what it is doing.
Mike |
|
 |
dz
Joined: 03 Mar 2012 Posts: 4
|
|
Posted: Wed Mar 07, 2012 11:12 pm |
|
|
I'm sorry Mr. Mike, because make you trouble.
Actually I try to learn ccs compiler but with simple program.
Below is the example of circuit diagram that I used to scroll message.
I really hope you can help me.
----------
|-----------------------------|---------|Q0 CLK|--- RB4
||----------------------------||--------|Q1 |
|||---------------------------|||-------|Q2 E|0---GND
||||--------------------------||||------|Q3 |
|||||-------------------------|||||-----|Q4 |
|||||''''''''''''''''''''''''''''''''''''''''''||||| |Q5 |
|||||''''''''''''''''''''''''''''''''''''''''''||||| |Q6 |
|||||''''''''''''''''''''''''''''''''''''''''''||||| |Q7 |
|||||''''''''''''''''''''''''''''''''''''''''''||||| |Q8 |
|||||''''''''''''''''''''''''''''''''''''''''''||||| |Q9 MR|-----RB5
|||||''''''''''''''''''''''''''''''''''''''''''||||| ----------
|||||''''''''''''''''''''''''''''''''''''''''''||||| CD4017
|||||''''''''''''''''''''''''''''''''''''''''''||||| (DECADE COUNTER)
----------- ''''''''''''''''''''''''''' ------------
|'''''''''''''''|'''''''''''''''''''''''''''''|''''''''''''''''''|
|''''''8'''''''|''''''''765432'''''' |''''''1'''''''' |
|'''''''''''''''|'''''''''''''''''''''''''''' |'''''''''''''''''|
|''5x7DM|'''''''''''''''''''''''''''' | 5x7DM'''|
----------- '''''''''''''''''''''''''''' ------------
''''|||||||'''''''''''''''''''''''''''''''''''''|||||||'''''''''''
''''''''''''''''||||||||'''''''''''''''''''''''''''''''''''''''''''''||||||||'''''
--------------------------- ''''''''''''--------------------------
|SR'''''''''''''''''''''''''''''''''''''''| ''''''' ''''''| SR'''''''''''''''''''''''''''''''''''|
|74LS595''''''''''''''''''''''''''''|765432 | 74LS595'''''''''''''''''''''''''|
|__ __ ''''''''''''''''''''''''''''''''| ''''''''''''''|__ __ ''''''''''''''''''''''''''''''|
|OE MR STCP DS SHCP |'''''''''''''''|OE MR STCP DS SHCP|
---------------------------- '''''''''''' ----------------------------
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''|''''''|''''''''|'''''''|''''''''|
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' GND RB2 RB3 RB0 RB1
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''|''''''''|'''''''|''''''''|
''''''''''''''''''''''''''''''''-------- ''''''''''''''''''''''''''|''''''''|'''''''|''''''''|
''''''''''''''''''''''''''''''''|----- -|'''''''''''''''''''''''''''|''''''''|'''''''|''''''''|
''''''''''''''''''''''''''''''''|----- -|RB2-----------|'''''''''|'''''''|''''''''|
''''''''''''''''''''''''''''''''|------|RB3------------------|'''''''|''''''''|
''''''''''''''''''''''''''''''''|------|RB0-----------------------|''''''''|
''''''''''''''''''''''''''''''''|------|RB1----------------------------|
''''''''''''''''''''''''''''''''|------|
''''''''''''''''''''''''''''''''|------|RB4---- CLOCK CD 4017
''''''''''''''''''''''''''''''''|------|RB5---- MR CD4017
''''''''''''''''''''''''''''''''|------|
''''''''''''''''''''''''''''''''--------
''''''''''''''''''''''''''''''''PIC16F877
Ok Mr. Mike this is the circuit.
RB0 used to input DATA through DS pin first shift register.
RB1, RB2 and RB3 used to control SHCP, MR and STCP pin of all shift register.
RB4 and RB5 is used to control CLOCK and MR for IC CD4017.
So, I really hope you to program this message display.
Thanks. |
|
 |
Mike Walne
Joined: 19 Feb 2004 Posts: 1785 Location: Boston Spa UK
|
| Code |
Posted: Fri Mar 09, 2012 4:34 am |
|
|
Hi dz,
The simple answer is no. I will NOT write a program for you.
If I write the program, YOU will learn NOTHING.
The idea is that YOU write the program yourself.
I will try to help you by asking questions designed to make YOU think.
You will probably get stuck. When that happens, and you show that you've made an effort, someone on the forum will help. We may suggest ways to improve your code, or methods to achieve a certain goal, but you have to do the work.
| Code: |
-----------------------------------------------------
| |
| PIC16F877 |
| RB2 RB3 RB1 RB0 RB5 RB4 |
-----------------------------------------------------
| | | | | |
| | | | | |
| | | | ---------------------------------------
| | | | | MR CK |
| | | | | CD4017 |
| | | | | Q Q Q Q Q Q Q Q Q Q |
| | | | | 9 8 7 6 5 4 3 2 1 0 |
| | | | ---------------------------------------
| | | | | | | | | | | | | |
| | | | | | | | | | | | | |
| | | | ------- ----------- -----------
| | | --|DS Q7|------WWW------| o o o o o | ---------| o o o o o |
| | | 0V--|OE Q6|------WWW------| o o o o o | | --------| o o o o o |
|--------------|MR Q5|------WWW------| o o o o o | || -------| o o o o o |
| | | | Q4|------WWW------| o o o o o | ||| ------| o o o o o |
| |----------|STCP Q3|------WWW------| o o o o o | |||| -----| o o o o o |
| | |------|SHCP Q2|------WWW------| o o o o o | |||||-----| o o o o o |
| | | --|QS7 Q1|------WWW------| o o o o o | |||||| ---| o o o o o |
| | | | ------- ----------- ||||||| -----------
| | | | '595 |||||||
| | | | |||||||
| | | | ------- |||||||
| | | --|DS Q7|------WWW----------------------- ||||||
| | | 0V--|OE Q6|------WWW------------------------ |||||
--------------|MR Q5|------WWW------------------------- ||||
| | | Q4|------WWW-------------------------- |||
----------|STCP Q3|------WWW--------------------------- ||
| | Q2|------WWW---------------------------- |
------|SHCP Q1|------WWW-----------------------------
-------
'595
|
I've redrawn your schematic, I found yours rather confusing.
NB. 5*7 LED matricees are available is two versions.
Before we go any further please confirm:-
(1) Your matrix has 5 anode connections and 7 cathode connections, and NOT the other way round.
(2) You had intended using current limiting resistors, in the positions I've shown.
(3) Your anticipated (designed) AVERAGE current for a lit LED.
(4) My schematic is essentially correct.
I'm assuming that you have actually got a matrix to hand, and can verify your answer to (3) will give a bright enough display.
Mike |
|
 |
temtronic
Joined: 01 Jul 2010 Posts: 9658 Location: Greensville,Ontario
|
|
Posted: Fri Mar 09, 2012 7:22 am |
|
|
hmmmm.'Project' has gone from an 8 by 8 matrix of LEDs to 10 by 7 !
Nice ASCII art ! Sure makes the project simple to understand but difficult to offer softweare advice as the hardware keeps changing!
Jay |
|
 |
Mike Walne
Joined: 19 Feb 2004 Posts: 1785 Location: Boston Spa UK
|
|
Posted: Fri Mar 09, 2012 7:48 am |
|
|
Hi Jay,
Glad you like the ASCII art work.
The 8*8 introduction was my fault. I simply lifted it from a previous post to give an idea of how dz could do a schematic in ASCII.
To be fair, dz has stuck to 5*7's.
It would be nice to see the answers to my questions, before the regulars make any suggestions, or point out pitfalls.
Mike |
|
 |
|