RetroBSD

2.11BSD operating system for microcontrollers
It is currently Sun Jul 23, 2017 6:57 pm

All times are UTC




Post new topic Reply to topic  [ 205 posts ]  Go to page 1, 2, 3, 4, 5 ... 11  Next
Author Message
PostPosted: Thu Nov 15, 2012 11:57 am 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2396
Location: Rapa Nui
As this topic has been elaborated for long time - the question is whether a board with a sdram (ie 8Mx16 - AS4C8M16S-7TCN, $1.60 here on Cote d'Azur) is worth of a "prototype" run. For example Jaromir's board with the above sdram and a cr1220 RTC battery holder from the bottom side (frankly I am trying to influence him in that direction :) ).
a. Is the driver stable enough?
b. Any dependencies?
c. Issues?
d. Speed?
e. Can we utilise those 8/16MB with retro somehow?
f. Is somebody interested to order it (the prototype run will be 10pcs)?
It seems only madscifi has got the real hands-on experience with it by now..
P.

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
PostPosted: Thu Nov 15, 2012 12:33 pm 
User avatar

Joined: Mon Nov 12, 2012 3:17 pm
Posts: 164
Location: Bratislava, Slovakia
We discussed this a lot with Pito. He took flight from Monaco to my living room just because of this.

There seems to be no problem to fit all the components - PIC32, SDRAM, RTC, battery, headers - on single 5x5cm board, available at seeedstudio for 1USD/pc (10 pcs for 10USD). Almost the same as I've done before with SRAM.
SDRAM are really cheap and plentiful, but we need rock stable low-level driver for it.

It would be great if madscifi could bring more light on this.

_________________
http://jaromir.xf.cz/
https://hackaday.io/jaromir/


Top
 Profile  
 
PostPosted: Thu Nov 15, 2012 1:59 pm 
Contributor

Joined: Mon Nov 12, 2012 1:34 pm
Posts: 1083
Hi,

It could be 2-3 boards.

1. PIC32 and SD so it can run Retro and I/O

2. PIC32 and SD and sdram and I/O

3. Or if PIC32 and SDRAM won't fit on same board, Two boards that interconnect.

GREAT idea. Count me in :).

Wiz

p.s.- Is there any way to disable delete commands. I seem to get a lot typed and then it all disappears. Not fun.


Top
 Profile  
 
PostPosted: Thu Nov 15, 2012 4:24 pm 
Committer

Joined: Thu Nov 08, 2012 3:55 am
Posts: 177
The SDRAM driver is, as far as I can determine, stable. It has several issues:

The first issue is that DMA and interrupts must be turned off during transfers to/from the SDRAM. At present the driver only disables interrupts, so it is incompatible with anything that uses DMA. This should not be a difficult thing to fix, but it might mean that the driver is incompatible with USB. I don't know enough about interfacing to USB to say whether or not this is actually a problem.

The other issue is that it does require a rather large (>1K) amount of kernel ram. There is nothing that can be done about this (short of putting a controller chip of some sort in between the CPU and the SDRAM) as the timing requirements are very strict and the driver depends accurate single cycle execution out of ram. The driver code has already been split into parts that can execute from FLASH (in C) and portions that must execute out of RAM (in ASM).

The final issue is that it takes a lot of pins.

The only real question is whether to support 8 or 16 bit data to the SDRAM. At present the driver only supports 8 bits, but 16 bits is pretty straightforward to add. Actually, moving to 16 bit transfers will shrink the part that executes out of RAM a little - it just means 8 more pins are lost to other uses.

I'd like to buy in for 2 boards, please. :)


Top
 Profile  
 
PostPosted: Thu Nov 15, 2012 5:48 pm 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2396
Location: Rapa Nui
@madscifi - thanks for the info! Assuming the USB is not required (still it is a retrocomputing gadget) for serial console (but for bootloader only) does it mean we have enough kernal ram for it?
In each case I would at least be happy to discuss the pin layout herein, as my idea is to have following there:
1. 36 pins for the sdram (16data + 12addr + 8cntrl = which ones?)
2. 1xSPI for onboard SDcard (or two cards?) (~5pins)
3. USB (bootloader only, used as 5V inp power conector) (2-3pins)
4. 1xI2C for RTC (2pins)
5. 1reset + 1usr button (2pins)
6. 4 LEDS (4pins)

and pinheaders for:
7. power down pin (1)
8. 1xSPI (3+2pins)
9. 2xUART (4pins)
10. 1xI2C (2pins)
11. an I/O port with at least 12 free pins (8+4pins)
12. and few 5V pins, few 3V3 pins and a lot of gnd pins..

That all on 5x5cm large board, with 4x holes 3.2mm dia. :o

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
PostPosted: Thu Nov 15, 2012 6:46 pm 
Committer
User avatar

Joined: Thu Oct 11, 2012 8:45 am
Posts: 1792
Location: Room 217, Floor 8, Arm 8, Wheel S7, Mars Base Alpha 3
Don't forget 3.3v voltage regulator ;)

I use this one a lot: http://uk.farnell.com/on-semiconductor/ncp4589dsq33t1g/ldo-300ma-3-3v-tri-5sc70/dp/1885143 - It's really really tiny (SOT-325, you can barely see the pins), and just needs 2 100nF capacitors, and it gives 300mA. Oh, and costs next to nothing.

_________________
Why not visit my eBay shop? http://stores.ebay.co.uk/Majenko-Technologies
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".


Top
 Profile  
 
PostPosted: Thu Nov 15, 2012 7:04 pm 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2396
Location: Rapa Nui
Such tiny ldo regs are good for max 3.7V input (ie lion) and low currents, as their thermal resistance is high. With 5V inp and ~150mA = 0.255W - too much for such package..

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
PostPosted: Thu Nov 15, 2012 7:40 pm 
Committer
User avatar

Joined: Thu Oct 11, 2012 8:45 am
Posts: 1792
Location: Room 217, Floor 8, Arm 8, Wheel S7, Mars Base Alpha 3
I've never had any heating issues with them, but then I never really exceed 100mA at 5V with them - and they are so small and cheap you have have different ones powering different areas of the board.

_________________
Why not visit my eBay shop? http://stores.ebay.co.uk/Majenko-Technologies
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".


Top
 Profile  
 
PostPosted: Thu Nov 15, 2012 8:54 pm 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2396
Location: Rapa Nui
Yes, those are good for powering various parts of pcb. That is better than one central reg. The worst case current consumption:
pic32@80MHz 90mA
sdcard 40mA
sdram ~30mA (130mA, 200mA auto refresh) @140MHz :)
BT module 40mA
LEDs 15mA :)
----------------------------
Total 215mA

(5V-3.3V)*0.215A=0.365W
0.365W*250degC/W= +91degC above room temperature

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
PostPosted: Thu Nov 15, 2012 9:11 pm 
Committer
User avatar

Joined: Thu Oct 11, 2012 8:45 am
Posts: 1792
Location: Room 217, Floor 8, Arm 8, Wheel S7, Mars Base Alpha 3
It also helps to reduce power rail noise from propagating around the board.

_________________
Why not visit my eBay shop? http://stores.ebay.co.uk/Majenko-Technologies
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".


Top
 Profile  
 
PostPosted: Fri Nov 16, 2012 7:16 am 
User avatar

Joined: Mon Nov 12, 2012 3:17 pm
Posts: 164
Location: Bratislava, Slovakia
madscifi: could you list all hardware/pins/peripheral limitations when it comes to SDRAM? For example data pins have to be on single port, clock line feeded from specific peripheral etc...?
After this I could start to design schematics and components placement. And then, routing. It will not be easy :)

I'm not sure if I'd like to power board from more separate regulators. It can be done, if there is a reason, like 30x30cm board with 5A total load. For 5x5cm board with total load 200mA it is pointless.
I like to use generic 1117 regulators. Cheap (~0,1EUR) and plentiful. It has one drawback - cooling tab is on Vout potential, so you have to place it on piece of copper with Vout (3,3V). For smaller board this is not acceptable, as we need big groundplane, so I'll use LF33 (~0,25EUR) in DPAK, as it has cooling tab on GND. It is solid 1A regulator.
I really don't want to mess with anything in SOT23 package. DPAK package itself has higher power margin than SOT23 with few square centimeters of copper.

I think USB and SDRAM shouldn't be problem. USB can be "unattended" while SDRAM block is transferred. USB hardware should do NACK-ing while it is not ready. Important is to check USB peripheral every few milseconds (or faster during enumeration) - I think this is OK for SDRAM access.

_________________
http://jaromir.xf.cz/
https://hackaday.io/jaromir/


Top
 Profile  
 
PostPosted: Fri Nov 16, 2012 8:19 am 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2396
Location: Rapa Nui
Pls show us the schematics then for a review..

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
PostPosted: Fri Nov 16, 2012 8:27 am 
User avatar

Joined: Mon Nov 12, 2012 3:17 pm
Posts: 164
Location: Bratislava, Slovakia
Yes, of course. First of all we need to clarify the points regarding physical SDRAM - PIC32 connection with madscifi, I'll draw the schematics then.

_________________
http://jaromir.xf.cz/
https://hackaday.io/jaromir/


Top
 Profile  
 
PostPosted: Fri Nov 16, 2012 2:28 pm 
Contributor

Joined: Mon Nov 12, 2012 1:34 pm
Posts: 1083
Hi All,

I would also include some way to connect to J-TAG pins.

Wiz


Top
 Profile  
 
PostPosted: Sat Nov 17, 2012 7:46 am 
User avatar

Joined: Mon Nov 12, 2012 3:17 pm
Posts: 164
Location: Bratislava, Slovakia
Yes, JTAG, it sounds reasonable.
By the way, are you actively using JTAG? I work with PIC32 (and other JTAG equipped PICs) for a while, but I've never used JTAG.

_________________
http://jaromir.xf.cz/
https://hackaday.io/jaromir/


Top
 Profile  
 
PostPosted: Sat Nov 17, 2012 7:50 am 
Committer
User avatar

Joined: Wed Oct 10, 2012 11:01 pm
Posts: 1079
Location: Sunnyvale, CA
I actively use JTAG with Bus Blaster and ejtagproxy. It works several times faster than pickit3.


Top
 Profile  
 
PostPosted: Sat Nov 17, 2012 8:04 am 
User avatar

Joined: Mon Nov 12, 2012 3:17 pm
Posts: 164
Location: Bratislava, Slovakia
ICD3 - what I use - works much faster compared to PicKit3 :)
But good to know about it. I'll definitively break out JTAG pins - at least on single row pin header. Full-sized JTAG connector would be probably too huge to fit on board.

_________________
http://jaromir.xf.cz/
https://hackaday.io/jaromir/


Top
 Profile  
 
PostPosted: Sat Nov 17, 2012 8:17 am 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2396
Location: Rapa Nui
I searched through the forum and this is what I've found on sdram pin layout (madscifi):
viewtopic.php?f=3&t=487&hilit=sdram+pins&start=80#p4281
http://andaquartergetsyoucoffee.com/ima ... n-r639.png
Attachment:
sdram pins.jpg
sdram pins.jpg [ 42.13 KiB | Viewed 17668 times ]

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
PostPosted: Sat Nov 17, 2012 8:24 am 
User avatar

Joined: Mon Nov 12, 2012 3:17 pm
Posts: 164
Location: Bratislava, Slovakia
What about A12? Do we need it, after all?

_________________
http://jaromir.xf.cz/
https://hackaday.io/jaromir/


Top
 Profile  
 
PostPosted: Sat Nov 17, 2012 8:26 am 
Committer
User avatar

Joined: Wed Oct 10, 2012 11:01 pm
Posts: 1079
Location: Sunnyvale, CA
I have ICD3 as well, but cannot get used to mplabx interface. I prefer plain old gdb. :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 205 posts ]  Go to page 1, 2, 3, 4, 5 ... 11  Next

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:




Powered by phpBB® Forum Software © phpBB Group

BSD Daemon used with permission